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.
withStudent:-ODEs:
ode1≔x2diffyx,x,x+4xdiffyx,x+25x2−9yx=0
ode1≔x2ⅆ2ⅆx2yx+4xⅆⅆxyx+25x2−9yx=0
ODEStepsode1
Let's solvex2ⅆ2ⅆx2yx+4xⅆⅆxyx+25x2−9yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=−25x2−9yxx2−4ⅆⅆxyxx•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+4ⅆⅆxyxx+25x2−9yxx2=0•Simplify ODEx2ⅆ2ⅆx2yx+25yxx2+4xⅆⅆxyx−9yx=0•Make a change of variablest=5x•Computeⅆⅆxyxⅆⅆxyx=5ⅆⅆtyt•Compute second derivativeⅆ2ⅆx2yx=25ⅆ2ⅆt2yt•Apply change of variables to the ODEt2ⅆ2ⅆt2yt+ytt2+4tⅆⅆtyt−9yt=0•Make a change of variablesyt=utt32•Computeⅆⅆtytⅆⅆtyt=−3ut2t52+ⅆⅆtutt32•Computeⅆ2ⅆt2ytⅆ2ⅆt2yt=15ut4t72−3ⅆⅆtutt52+ⅆ2ⅆt2utt32•Apply change of variables to the ODEutt2+ⅆ2ⅆt2utt2+ⅆⅆtutt−45ut4=0•ODE is now of the Bessel form•Solution to Bessel ODEut=C1BesselJ352,t+C2BesselY352,t•Make the change fromyxback toytyt=C1BesselJ352,t+C2BesselY352,tt32•Make the change fromtback toxyx=C1BesselJ352,5x+C2BesselY352,5x525x32
ode2≔−x2+1diffyx,x,x−xdiffyx,x+yx=0
ode2≔−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+yx=0
ODEStepsode2
Let's solve−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=yxx2−1−xⅆⅆxyxx2−1•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+xⅆⅆxyxx2−1−yxx2−1=0•Multiply by denominators of ODE−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+yx=0•Make a change of variablesθ=arccosx•Calculateⅆⅆxyxwith change of variablesⅆⅆxyx=ⅆⅆθyθⅆⅆxθx•Compute1stderivativeⅆⅆxyxⅆⅆxyx=−ⅆⅆθyθ−x2+1•Calculateⅆ2ⅆx2yxwith change of variablesⅆ2ⅆx2yx=ⅆ2ⅆθ2yθⅆⅆxθx2+ⅆ2ⅆx2θxⅆⅆθyθ•Compute2ndderivativeⅆ2ⅆx2yxⅆ2ⅆx2yx=ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132•Apply the change of variables to the ODE−x2+1ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1+yx=0•Multiply through−ⅆ2ⅆθ2yθx2−x2+1+ⅆ2ⅆθ2yθ−x2+1+x3ⅆⅆθyθ−x2+132−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1+yx=0•Simplify ODEⅆ2ⅆθ2yθ+yx=0•ODE is that of a harmonic oscillator with given general solutionyθ=C1sinθ+C2cosθ•Revert back toxyx=C1sinarccosx+C2cosarccosx•Use trig identity to simplifysinarccosxsinarccosx=−x2+1•Simplify solution to the ODEyx=C1−x2+1+C2x
ode3≔−x2+1diffyx,x,x−xdiffyx,x+4yx=0
ode3≔−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+4yx=0
ODEStepsode3
Let's solve−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+4yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=4yxx2−1−xⅆⅆxyxx2−1•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+xⅆⅆxyxx2−1−4yxx2−1=0•Multiply by denominators of ODE−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+4yx=0•Make a change of variablesθ=arccosx•Calculateⅆⅆxyxwith change of variablesⅆⅆxyx=ⅆⅆθyθⅆⅆxθx•Compute1stderivativeⅆⅆxyxⅆⅆxyx=−ⅆⅆθyθ−x2+1•Calculateⅆ2ⅆx2yxwith change of variablesⅆ2ⅆx2yx=ⅆ2ⅆθ2yθⅆⅆxθx2+ⅆ2ⅆx2θxⅆⅆθyθ•Compute2ndderivativeⅆ2ⅆx2yxⅆ2ⅆx2yx=ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132•Apply the change of variables to the ODE−x2+1ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1+4yx=0•Multiply through−ⅆ2ⅆθ2yθx2−x2+1+ⅆ2ⅆθ2yθ−x2+1+x3ⅆⅆθyθ−x2+132−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1+4yx=0•Simplify ODEⅆ2ⅆθ2yθ+4yx=0•ODE is that of a harmonic oscillator with given general solutionyθ=C1sin2θ+C2cos2θ•Revert back toxyx=C1sin2arccosx+C2cos2arccosx•Apply double angle identities to solutionyx=C1sinarccosxcosarccosx+C22cosarccosx2−1•Use trig identity to simplify sinsinarccosx=−x2+1•Simplify solution to the ODEyx=C1x−x2+1+C22x2−1
ode4≔−x2+1diffyx,x,x−xdiffyx,x+9yx=0
ode4≔−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+9yx=0
ODEStepsode4
Let's solve−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+9yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=9yxx2−1−xⅆⅆxyxx2−1•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+xⅆⅆxyxx2−1−9yxx2−1=0•Multiply by denominators of ODE−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx+9yx=0•Make a change of variablesθ=arccosx•Calculateⅆⅆxyxwith change of variablesⅆⅆxyx=ⅆⅆθyθⅆⅆxθx•Compute1stderivativeⅆⅆxyxⅆⅆxyx=−ⅆⅆθyθ−x2+1•Calculateⅆ2ⅆx2yxwith change of variablesⅆ2ⅆx2yx=ⅆ2ⅆθ2yθⅆⅆxθx2+ⅆ2ⅆx2θxⅆⅆθyθ•Compute2ndderivativeⅆ2ⅆx2yxⅆ2ⅆx2yx=ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132•Apply the change of variables to the ODE−x2+1ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1+9yx=0•Multiply through−ⅆ2ⅆθ2yθx2−x2+1+ⅆ2ⅆθ2yθ−x2+1+x3ⅆⅆθyθ−x2+132−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1+9yx=0•Simplify ODEⅆ2ⅆθ2yθ+9yx=0•ODE is that of a harmonic oscillator with given general solutionyθ=C1sin3θ+C2cos3θ•Revert back toxyx=C1sin3arccosx+C2cos3arccosx
ode5≔−x2+1diffyx,x,x−xdiffyx,x−4yx=0
ode5≔−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx−4yx=0
ODEStepsode5
Let's solve−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx−4yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=−4yxx2−1−xⅆⅆxyxx2−1•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+xⅆⅆxyxx2−1+4yxx2−1=0•Multiply by denominators of ODE−x2+1ⅆ2ⅆx2yx−xⅆⅆxyx−4yx=0•Make a change of variablesθ=arccosx•Calculateⅆⅆxyxwith change of variablesⅆⅆxyx=ⅆⅆθyθⅆⅆxθx•Compute1stderivativeⅆⅆxyxⅆⅆxyx=−ⅆⅆθyθ−x2+1•Calculateⅆ2ⅆx2yxwith change of variablesⅆ2ⅆx2yx=ⅆ2ⅆθ2yθⅆⅆxθx2+ⅆ2ⅆx2θxⅆⅆθyθ•Compute2ndderivativeⅆ2ⅆx2yxⅆ2ⅆx2yx=ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132•Apply the change of variables to the ODE−x2+1ⅆ2ⅆθ2yθ−x2+1−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1−4yx=0•Multiply through−ⅆ2ⅆθ2yθx2−x2+1+ⅆ2ⅆθ2yθ−x2+1+x3ⅆⅆθyθ−x2+132−xⅆⅆθyθ−x2+132+xⅆⅆθyθ−x2+1−4yx=0•Simplify ODE−4yx+ⅆ2ⅆθ2yθ=0•ODE is second order linear with characteristic polynomial that is the difference of squares with given general solutionyθ=C1ⅇ2θ+C2ⅇ−2θ•Revert back toxyx=C1ⅇ2arccosx+C2ⅇ−2arccosx
See Also
diff
Int
Student
Student[ODEs]
Student[ODEs][ODESteps]
Download Help Document