Differential Equations

Wronskian<!-- --> | Differential Equations

Wronskian

Sharan Sajiv Menon - September 6th, 2021


How to calculate

W(f,g)=f(t)g(t)f(t)g(t)=f(t)g(t)g(t)f(t)W(f, g)=\begin{vmatrix}f(t) && g(t) \\ f'(t) && g'(t)\end{vmatrix}= f(t)g'(t) - g(t)f'(t)

Linear Independence

If W(f,g)(x0)0W(f, g)(x_0) \ne 0 for some x0x_0, then f(x)f(x) and g(x)g(x) are linearly independent. If W(f,g)(x0)=0W(f, g)(x_0)=0 for some x0x_0, then f(x)f(x) and g(x)g(x)​ are linearly dependent.

For a differential equation, y1y_1 and y2y_2 must be linearly independent in order to be solutions to the DE

Example

Problem 8: Determine if the following functions are linearly independent or dependent: f(t)=2t2f(t)=2t^2 and g(t)=t4g(t)=t^4

Solution 8: Use the Wronskian to determine linear independence

W(f,g)=2t2t44t4t3=8t54t5=4t5W(f, g)=\begin{vmatrix} 2t^2 && t^4 \\ 4t && 4t^3 \end{vmatrix} = 8t^5 - 4t^5=4t^5

As long as t0t \ne 0, then f(t)f(t) and g(t)g(t) are linearly independent.

Code

We use sympy for this, since we are dealing with symbolic mathematics.

import sympy
from sympy import *
x, y, z, t = symbols('x y z t')

Function to calculate wronskian below:

def wronskian(f, g):
  fp = diff(f, t)
  gp = diff(g, t)
  wronskianm = Matrix([[f, g], [fp, gp]])
  return wronskianm.det()

Testing the function on the example we solved above.

f = 2*t**2
g = t**4
wronskian(f, g)
[OUTPUT]
4*t**5

4*t**5 is equivalent to 4t54t^5.

Read More

Wikipedia Article

Created by Sharan Sajiv Menon, © 2022