ODE Steps for Special Function Solutions
Overview
Examples
This help page gives a few examples of using the command ODESteps to solve ordinary differential equations in terms of special functions.
See Student[ODEs][ODESteps] for a general description of the command ODESteps and its calling sequence.
with⁡Student:-ODEs:
ode1≔x2⁢diff⁡y⁡x,x,x+4⁢x⁢diff⁡y⁡x,x+25⁢x2−9⁢y⁡x=0
ode1≔x2⁢ⅆ2ⅆx2y⁡x+4⁢x⁢ⅆⅆxy⁡x+25⁢x2−9⁢y⁡x=0
ODESteps⁡ode1
Let's solvex2⁢ⅆ2ⅆx2y⁡x+4⁢x⁢ⅆⅆxy⁡x+25⁢x2−9⁢y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=−25⁢x2−9⁢y⁡xx2−4⁢ⅆⅆxy⁡xx•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x+4⁢ⅆⅆxy⁡xx+25⁢x2−9⁢y⁡xx2=0•Simplify ODEx2⁢ⅆ2ⅆx2y⁡x+25⁢y⁡x⁢x2+4⁢x⁢ⅆⅆxy⁡x−9⁢y⁡x=0•Make a change of variablest=5⁢x•Computeⅆⅆxy⁡xⅆⅆxy⁡x=5⁢ⅆⅆty⁡t•Compute second derivativeⅆ2ⅆx2y⁡x=25⁢ⅆ2ⅆt2y⁡t•Apply change of variables to the ODEt2⁢ⅆ2ⅆt2y⁡t+y⁡t⁢t2+4⁢t⁢ⅆⅆty⁡t−9⁢y⁡t=0•Make a change of variablesy⁡t=u⁡tt32•Computeⅆⅆty⁡tⅆⅆty⁡t=−3⁢u⁡t2⁢t52+ⅆⅆtu⁡tt32•Computeⅆ2ⅆt2y⁡tⅆ2ⅆt2y⁡t=15⁢u⁡t4⁢t72−3⁢ⅆⅆtu⁡tt52+ⅆ2ⅆt2u⁡tt32•Apply change of variables to the ODEu⁡t⁢t2+ⅆ2ⅆt2u⁡t⁢t2+ⅆⅆtu⁡t⁢t−45⁢u⁡t4=0•ODE is now of the Bessel form•Solution to Bessel ODEu⁡t=_C1⁢BesselJ⁡3⁢52,t+_C2⁢BesselY⁡3⁢52,t•Make the change fromy⁡xback toy⁡ty⁡t=_C1⁢BesselJ⁡3⁢52,t+_C2⁢BesselY⁡3⁢52,tt32•Make the change fromtback toxy⁡x=_C1⁢BesselJ⁡3⁢52,5⁢x+_C2⁢BesselY⁡3⁢52,5⁢x⁢525⁢x32
ode2≔−x2+1⁢diff⁡y⁡x,x,x−x⁢diff⁡y⁡x,x+y⁡x=0
ode2≔−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+y⁡x=0
ODESteps⁡ode2
Let's solve−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=y⁡xx2−1−x⁢ⅆⅆxy⁡xx2−1•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x−y⁡xx2−1+x⁢ⅆⅆxy⁡xx2−1=0•Multiply by denominators of ODE−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+y⁡x=0•Make a change of variablesθ=arccos⁡x•Calculateⅆⅆxy⁡xwith change of variablesⅆⅆxy⁡x=ⅆⅆxθ⁡x⁢ⅆⅆθy⁡θ•Computeⅆⅆxy⁡xⅆⅆxy⁡x=−ⅆⅆθy⁡θ−x2+1•Calculateⅆ2ⅆx2y⁡xwith change of variablesⅆ2ⅆx2y⁡x=ⅆ2ⅆx2θ⁡x⁢ⅆⅆθy⁡θ+ⅆⅆxθ⁡x2⁢ⅆ2ⅆθ2y⁡θ•Compute second derivativeⅆ2ⅆx2y⁡x=−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1•Apply the change of variables to the ODE−x2+1⁢−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1+x⁢ⅆⅆθy⁡θ−x2+1+y⁡x=0•Multiply throughx3⁢ⅆⅆθy⁡θ−x2+132−x⁢ⅆⅆθy⁡θ−x2+132−ⅆ2ⅆθ2y⁡θ⁢x2−x2+1+ⅆ2ⅆθ2y⁡θ−x2+1+x⁢ⅆⅆθy⁡θ−x2+1+y⁡x=0•Simplify ODEⅆ2ⅆθ2y⁡θ+y⁡x=0•ODE is that of a harmonic oscillator with given general solutiony⁡θ=_C1⁢+_C2⁢•Revert back toxy⁡x=_C1⁢+_C2⁢•Use trig identity to simplify=−x2+1•Simplify solution to the ODEy⁡x=_C1⁢−x2+1+_C2⁢x
ode3≔−x2+1⁢diff⁡y⁡x,x,x−x⁢diff⁡y⁡x,x+4⁢y⁡x=0
ode3≔−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+4⁢y⁡x=0
ODESteps⁡ode3
Let's solve−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+4⁢y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=4⁢y⁡xx2−1−x⁢ⅆⅆxy⁡xx2−1•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x−4⁢y⁡xx2−1+x⁢ⅆⅆxy⁡xx2−1=0•Multiply by denominators of ODE−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+4⁢y⁡x=0•Make a change of variablesθ=arccos⁡x•Calculateⅆⅆxy⁡xwith change of variablesⅆⅆxy⁡x=ⅆⅆxθ⁡x⁢ⅆⅆθy⁡θ•Computeⅆⅆxy⁡xⅆⅆxy⁡x=−ⅆⅆθy⁡θ−x2+1•Calculateⅆ2ⅆx2y⁡xwith change of variablesⅆ2ⅆx2y⁡x=ⅆ2ⅆx2θ⁡x⁢ⅆⅆθy⁡θ+ⅆⅆxθ⁡x2⁢ⅆ2ⅆθ2y⁡θ•Compute second derivativeⅆ2ⅆx2y⁡x=−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1•Apply the change of variables to the ODE−x2+1⁢−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1+x⁢ⅆⅆθy⁡θ−x2+1+4⁢y⁡x=0•Multiply throughx3⁢ⅆⅆθy⁡θ−x2+132−x⁢ⅆⅆθy⁡θ−x2+132−ⅆ2ⅆθ2y⁡θ⁢x2−x2+1+ⅆ2ⅆθ2y⁡θ−x2+1+x⁢ⅆⅆθy⁡θ−x2+1+4⁢y⁡x=0•Simplify ODEⅆ2ⅆθ2y⁡θ+4⁢y⁡x=0•ODE is that of a harmonic oscillator with given general solutiony⁡θ=_C1⁢+_C2⁢•Revert back toxy⁡x=_C1⁢+_C2⁢•Apply double angle identities to solutiony⁡x=_C1⁢⁢+_C2⁢2⁢2−1•Use trig identity to simplify sin=−x2+1•Simplify solution to the ODEy⁡x=_C1⁢x⁢−x2+1+_C2⁢2⁢x2−1
ode4≔−x2+1⁢diff⁡y⁡x,x,x−x⁢diff⁡y⁡x,x+9⁢y⁡x=0
ode4≔−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+9⁢y⁡x=0
ODESteps⁡ode4
Let's solve−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+9⁢y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=9⁢y⁡xx2−1−x⁢ⅆⅆxy⁡xx2−1•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x−9⁢y⁡xx2−1+x⁢ⅆⅆxy⁡xx2−1=0•Multiply by denominators of ODE−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x+9⁢y⁡x=0•Make a change of variablesθ=arccos⁡x•Calculateⅆⅆxy⁡xwith change of variablesⅆⅆxy⁡x=ⅆⅆxθ⁡x⁢ⅆⅆθy⁡θ•Computeⅆⅆxy⁡xⅆⅆxy⁡x=−ⅆⅆθy⁡θ−x2+1•Calculateⅆ2ⅆx2y⁡xwith change of variablesⅆ2ⅆx2y⁡x=ⅆ2ⅆx2θ⁡x⁢ⅆⅆθy⁡θ+ⅆⅆxθ⁡x2⁢ⅆ2ⅆθ2y⁡θ•Compute second derivativeⅆ2ⅆx2y⁡x=−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1•Apply the change of variables to the ODE−x2+1⁢−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1+x⁢ⅆⅆθy⁡θ−x2+1+9⁢y⁡x=0•Multiply throughx3⁢ⅆⅆθy⁡θ−x2+132−x⁢ⅆⅆθy⁡θ−x2+132−ⅆ2ⅆθ2y⁡θ⁢x2−x2+1+ⅆ2ⅆθ2y⁡θ−x2+1+x⁢ⅆⅆθy⁡θ−x2+1+9⁢y⁡x=0•Simplify ODEⅆ2ⅆθ2y⁡θ+9⁢y⁡x=0•ODE is that of a harmonic oscillator with given general solutiony⁡θ=_C1⁢+_C2⁢•Revert back toxy⁡x=_C1⁢+_C2⁢
ode5≔−x2+1⁢diff⁡y⁡x,x,x−x⁢diff⁡y⁡x,x−4⁢y⁡x=0
ode5≔−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x−4⁢y⁡x=0
ODESteps⁡ode5
Let's solve−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x−4⁢y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Isolate 2nd derivativeⅆ2ⅆx2y⁡x=−4⁢y⁡xx2−1−x⁢ⅆⅆxy⁡xx2−1•Group terms withy⁡xon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2y⁡x+4⁢y⁡xx2−1+x⁢ⅆⅆxy⁡xx2−1=0•Multiply by denominators of ODE−x2+1⁢ⅆ2ⅆx2y⁡x−x⁢ⅆⅆxy⁡x−4⁢y⁡x=0•Make a change of variablesθ=arccos⁡x•Calculateⅆⅆxy⁡xwith change of variablesⅆⅆxy⁡x=ⅆⅆxθ⁡x⁢ⅆⅆθy⁡θ•Computeⅆⅆxy⁡xⅆⅆxy⁡x=−ⅆⅆθy⁡θ−x2+1•Calculateⅆ2ⅆx2y⁡xwith change of variablesⅆ2ⅆx2y⁡x=ⅆ2ⅆx2θ⁡x⁢ⅆⅆθy⁡θ+ⅆⅆxθ⁡x2⁢ⅆ2ⅆθ2y⁡θ•Compute second derivativeⅆ2ⅆx2y⁡x=−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1•Apply the change of variables to the ODE−x2+1⁢−x⁢ⅆⅆθy⁡θ−x2+132+ⅆ2ⅆθ2y⁡θ−x2+1