ODE Steps for Series Solutions
Overview
Examples
This help page gives a few examples of using the command ODESteps to solve ordinary differential equations by means of series expansions.
See Student[ODEs][ODESteps] for a general description of the command ODESteps and its calling sequence.
withStudent:-ODEs:
ode1≔x2diffyx,x,x+xdiffyx,x+5xyx=0
ode1≔x2ⅆ2ⅆx2yx+xⅆⅆxyx+5xyx=0
ODEStepsode1
Let's solvex2ⅆ2ⅆx2yx+xⅆⅆxyx+5xyx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=−5yxx−ⅆⅆxyxx•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+ⅆⅆxyxx+5yxx=0▫Check to see ifx0=0is a regular singular point◦Define functionsP2x=1x,P3x=5x◦x⋅P2xis analytic atx=0x⋅P2xx=0|x⋅P2xx=0=1◦x2⋅P3xis analytic atx=0x2⋅P3xx=0|x2⋅P3xx=0=0◦x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0•Multiply by denominatorsⅆ2ⅆx2yxx+5yx+ⅆⅆxyx=0•Assume series solution foryxyx=∑k=0∞akxk+r▫Rewrite ODE with series expansions◦Convertⅆⅆxyxto series expansionⅆⅆxyx=∑k=0∞akk+rxk+r−1◦Shift index usingk->k+1ⅆⅆxyx=∑k=−1∞ak+1k+1+rxk+r◦Convertx⋅ⅆ2ⅆx2yxto series expansionx⋅ⅆ2ⅆx2yx=∑k=0∞akk+rk+r−1xk+r−1◦Shift index usingk->k+1x⋅ⅆ2ⅆx2yx=∑k=−1∞ak+1k+1+rk+rxk+rRewrite ODE with series expansionsa0r2x−1+r+∑k=0∞ak+1k+1+r2+5akxk+r=0•a0cannot be 0 by assumption, giving the indicial equationr2=0•Values of r that satisfy the indicial equationr=0•Each term in the series must be 0, giving the recursion relationak+1k+12+5ak=0•Recursion relation that defines series solution to ODEak+1=−5akk+12•Recursion relation forr=0ak+1=−5akk+12•Solution forr=0yx=∑k=0∞akxk,ak+1=−5akk+12
ode2≔diffyx,x,x+xdiffyx,x+yx=0
ode2≔ⅆ2ⅆx2yx+xⅆⅆxyx+yx=0
ODEStepsode2
Let's solveⅆ2ⅆx2yx+xⅆⅆxyx+yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Assume series solution foryxyx=∑k=0∞akxk▫Rewrite DE with series expansions◦Convertx⋅ⅆⅆxyxto series expansionx⋅ⅆⅆxyx=∑k=0∞akkxk◦Convertⅆ2ⅆx2yxto series expansionⅆ2ⅆx2yx=∑k=2∞akkk−1xk−2◦Shift index usingk->k+2ⅆ2ⅆx2yx=∑k=0∞ak+2k+2k+1xkRewrite DE with series expansions∑k=0∞ak+2k+2k+1+akk+1xk=0•Each term in the series must be 0, giving the recursion relationk+1ak+2k+2+ak=0•Recursion relation that defines the series solution to the ODEyx=∑k=0∞akxk,ak+2=−akk+2
ode3≔x2diffyx,x,x+x2diffyx,x+x3−6yx=0
ode3≔x2ⅆ2ⅆx2yx+x2ⅆⅆxyx+x3−6yx=0
ODEStepsode3
Let's solvex2ⅆ2ⅆx2yx+x2ⅆⅆxyx+x3−6yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=−x3−6yxx2−ⅆⅆxyx•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+ⅆⅆxyx+x3−6yxx2=0▫Check to see ifx0=0is a regular singular point◦Define functionsP2x=1,P3x=x3−6x2◦x⋅P2xis analytic atx=0x⋅P2xx=0|x⋅P2xx=0=0◦x2⋅P3xis analytic atx=0x2⋅P3xx=0|x2⋅P3xx=0=−6◦x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0•Multiply by denominatorsx2ⅆ2ⅆx2yx+x2ⅆⅆxyx+x3−6yx=0•Assume series solution foryxyx=∑k=0∞akxk+r▫Rewrite ODE with series expansions◦Convertxm⋅yxto series expansion form=0..3xm⋅yx=∑k=0∞akxk+r+m◦Shift index usingk->k−mxm⋅yx=∑k=m∞ak−mxk+r◦Convertx2⋅ⅆⅆxyxto series expansionx2⋅ⅆⅆxyx=∑k=0∞akk+rxk+r+1◦Shift index usingk->k−1x2⋅ⅆⅆxyx=∑k=1∞ak−1k−1+rxk+r◦Convertx2⋅ⅆ2ⅆx2yxto series expansionx2⋅ⅆ2ⅆx2yx=∑k=0∞akk+rk−1+rxk+rRewrite ODE with series expansionsa02+r−3+rxr+a13+r−2+r+a0rx1+r+a24+r−1+r+a11+rx2+r+∑k=3∞akk+r+2k+r−3+ak−1k−1+r+ak−3xk+r=0•a0cannot be 0 by assumption, giving the indicial equation2+r−3+r=0•Values of r that satisfy the indicial equationr∈−2,3•The coefficients of each power ofxmust be 0a13+r−2+r+a0r=0,a24+r−1+r+a11+r=0•Solve for the dependent coefficient(s)a1=−a0rr2+r−6,a2=a0r1+rr4+4r3−7r2−22r+24•Each term in the series must be 0, giving the recursion relationakk+r+2k+r−3+ak−1k+ak−1r+ak−3−ak−1=0•Shift index usingk->k+3ak+3k+5+rk+r+ak+2k+3+ak+2r+ak−ak+2=0•Recursion relation that defines series solution to ODEak+3=−kak+2+ak+2r+ak+2ak+2k+5+rk+r•Recursion relation forr=−2ak+3=−kak+2+akk+3k−2•Series not valid forr=−2, division by0in the recursion relation atk=2ak+3=−kak+2+akk+3k−2•Recursion relation forr=3ak+3=−kak+2+ak+5ak+2k+8k+3•Solution forr=3yx=∑k=0∞akxk+3,ak+3=−kak+2+ak+5ak+2k+8k+3,a1=−a02,a2=a07
ode4≔diffyx,x,x+diffyx,x+x2yx=0
ode4≔ⅆ2ⅆx2yx+ⅆⅆxyx+x2yx=0
ODEStepsode4
Let's solveⅆ2ⅆx2yx+ⅆⅆxyx+x2yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Assume series solution foryxyx=∑k=0∞akxk▫Rewrite ODE with series expansions◦Convertx2⋅yxto series expansionx2⋅yx=∑k=0∞akxk+2◦Shift index usingk->k−2x2⋅yx=∑k=2∞ak−2xk◦Convertⅆⅆxyxto series expansionⅆⅆxyx=∑k=1∞akkxk−1◦Shift index usingk->k+1ⅆⅆxyx=∑k=0∞ak+1k+1xk◦Convertⅆ2ⅆx2yxto series expansionⅆ2ⅆx2yx=∑k=2∞akkk−1xk−2◦Shift index usingk->k+2ⅆ2ⅆx2yx=∑k=0∞ak+2k+2k+1xkRewrite ODE with series expansions2a2+a1+6a3+2a2x+∑k=2∞ak+2k+2k+1+ak+1k+1+ak−2xk=0•The coefficients of each power ofxmust be 02a2+a1=0,6a3+2a2=0•Solve for the dependent coefficient(s)a2=−a12,a3=a16•Each term in the series must be 0, giving the recursion relationk2+3k+2ak+2+ak+1k+ak−2+ak+1=0•Shift index usingk->k+2k+22+3k+8ak+4+ak+3k+2+ak+ak+3=0•Recursion relation that defines the series solution to the ODEyx=∑k=0∞akxk,ak+4=−kak+3+ak+3ak+3k2+7k+12,a2=−a12,a3=a16
ode5≔diff−x2+1diffyx,x,x+12yx=0
ode5≔−2xⅆⅆxyx+−x2+1ⅆ2ⅆx2yx+12yx=0
ODEStepsode5
Let's solve−2xⅆⅆxyx+−x2+1ⅆ2ⅆx2yx+12yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=12yxx2−1−2xⅆⅆxyxx2−1•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx+2xⅆⅆxyxx2−1−12yxx2−1=0▫Check to see ifx0is a regular singular point◦Define functionsP2x=2xx2−1,P3x=−12x2−1◦x+1⋅P2xis analytic atx=−1x+1⋅P2xx=−1|x+1⋅P2xx=−1=1◦x+12⋅P3xis analytic atx=−1x+12⋅P3xx=−1|x+12⋅P3xx=−1=0◦x=−1is a regular singular pointCheck to see ifx0is a regular singular pointx0=−1•Multiply by denominatorsⅆ2ⅆx2yxx2−1+2xⅆⅆxyx−12yx=0•Change variables usingx=u−1so that the regular singular point is atu=0u2−2uⅆ2ⅆu2yu+2u−2ⅆⅆuyu−12yu=0•Assume series solution foryuyu=∑k=0∞akuk+r▫Rewrite ODE with series expansions◦Convertum⋅ⅆⅆuyuto series expansion form=0..1um⋅ⅆⅆuyu=∑k=0∞akk+ruk+r−1+m◦Shift index usingk->k+1−mum⋅ⅆⅆuyu=∑k=−1+m∞ak+1−mk+1−m+ruk+r◦Convertum⋅ⅆ2ⅆu2yuto series expansion form=1..2um⋅ⅆ2ⅆu2yu=∑k=0∞akk+rk+r−1uk+r−2+m◦Shift index usingk->k+2−mum⋅ⅆ2ⅆu2yu=∑k=−2+m∞ak+2−mk+2−m+rk+1−m+ruk+rRewrite ODE with series expansions−2a0r2u−1+r+∑k=0∞−2ak+1k+1+r2+akk+r+4k+r−3uk+r=0•a0cannot be 0 by assumption, giving the indicial equation−2r2=0•Values of r that satisfy the indicial equationr=0•Each term in the series must be 0, giving the recursion relation−2ak+1k+12+akk+4k−3=0•Recursion relation that defines series solution to ODEak+1=akk+4k−32k+12•Recursion relation forr=0; series terminates atk=3ak+1=akk+4k−32k+12•Apply recursion relation fork=0a1=−6a0•Apply recursion relation fork=1a2=−5a14•Express in terms ofa0a2=15a02•Apply recursion relation fork=2a3=−a23•Express in terms ofa0a3=−5a02•Terminating series solution of the ODE forr=0. Use reduction of order to find the second linearly independent solutionyu=a0⋅1−6u+152u2−52u3•Revert the change of variablesu=x+1yx=a032x−52x3
ode6≔xdiffyx,x,x+1−xdiffyx,x+4yx=0
ode6≔ⅆ2ⅆx2yxx+1−xⅆⅆxyx+4yx=0
ODEStepsode6
Let's solveⅆ2ⅆx2yxx+1−xⅆⅆxyx+4yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=−4yxx+−1+xⅆⅆxyxx•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx−−1+xⅆⅆxyxx+4yxx=0▫Check to see ifx0=0is a regular singular point◦Define functionsP2x=−−1+xx,P3x=4x◦x⋅P2xis analytic atx=0x⋅P2xx=0|x⋅P2xx=0=1◦x2⋅P3xis analytic atx=0x2⋅P3xx=0|x2⋅P3xx=0=0◦x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0•Multiply by denominatorsⅆ2ⅆx2yxx+1−xⅆⅆxyx+4yx=0•Assume series solution foryxyx=∑k=0∞akxk+r▫Rewrite ODE with series expansions◦Convertxm⋅ⅆⅆxyxto series expansion form=0..1xm⋅ⅆⅆxyx=∑k=0∞akk+rxk+r−1+m◦Shift index usingk->k+1−mxm⋅ⅆⅆxyx=∑k=−1+m∞ak+1−mk+1−m+rxk+r◦Convertx⋅ⅆ2ⅆx2yxto series expansionx⋅ⅆ2ⅆx2yx=∑k=0∞akk+rk+r−1xk+r−1◦Shift index usingk->k+1x⋅ⅆ2ⅆx2yx=∑k=−1∞ak+1k+1+rk+rxk+rRewrite ODE with series expansionsa0r2x−1+r+∑k=0∞ak+1k+1+r2−akk+r−4xk+r=0•a0cannot be 0 by assumption, giving the indicial equationr2=0•Values of r that satisfy the indicial equationr=0•Each term in the series must be 0, giving the recursion relationak+1k+12−akk−4=0•Recursion relation that defines series solution to ODEak+1=akk−4k+12•Recursion relation forr=0; series terminates atk=4ak+1=akk−4k+12•Apply recursion relation fork=0a1=−4a0•Apply recursion relation fork=1a2=−3a14•Express in terms ofa0a2=3a0•Apply recursion relation fork=2a3=−2a29•Express in terms ofa0a3=−2a03•Apply recursion relation fork=3a4=−a316•Express in terms ofa0a4=a024•Terminating series solution of the ODE forr=0. Use reduction of order to find the second linearly independent solutionyx=a0⋅1−4x+3x2−23x3+124x4
ode7≔xdiffyx,x,x+1−xdiffyx,x+6yx=0
ode7≔ⅆ2ⅆx2yxx+1−xⅆⅆxyx+6yx=0
ODEStepsode7
Let's solveⅆ2ⅆx2yxx+1−xⅆⅆxyx+6yx=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2yx•Isolate 2nd derivativeⅆ2ⅆx2yx=−6yxx+−1+xⅆⅆxyxx•Group terms withyxon the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearⅆ2ⅆx2yx−−1+xⅆⅆxyxx+6yxx=0▫Check to see ifx0=0is a regular singular point◦Define functionsP2x=−−1+xx,P3x=6x◦x⋅P2xis analytic atx=0x⋅P2xx=0|x⋅P2xx=0=1◦x2⋅P3xis analytic atx=0x2⋅P3xx=0|x2⋅P3xx=0=0◦x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0•Multiply by denominatorsⅆ2ⅆx2yxx+1−xⅆⅆxyx+6yx=0•Assume series solution foryxyx=∑k=0∞akxk+r▫Rewrite ODE with series expansions◦Convertxm⋅ⅆⅆxyxto series expansion form=0..1xm⋅ⅆⅆxyx=∑k=0∞akk+rxk+r−1+m◦Shift index usingk->k+1−mxm⋅ⅆⅆxyx=∑k=−1+m∞ak+1−mk+1−m+rxk+r◦Convertx⋅ⅆ2ⅆx2yxto series expansionx⋅ⅆ2ⅆx2yx=∑k=0∞akk+rk+r−1xk+r−1◦Shift index usingk->k+1x⋅ⅆ2ⅆx2yx=∑k=−1∞ak+1k+1+rk+rxk+rRewrite ODE with series expansionsa0r2x−1+r+∑k=0∞ak+1k+1+r2−akk+r−6xk+r=0•a0cannot be 0 by assumption, giving the indicial equationr2=0•Values of r that satisfy the indicial equationr=0•Each term in the series must be 0, giving the recursion relationak+1k+12−akk−6=0•Recursion relation that defines series solution to ODEak+1=akk−6k+12•Recursion relation forr=0; series terminates atk=6ak+1=akk−6k+12•Recursion relation that defines the terminating series solution of the ODE forr=0yx=∑k=05akxk,ak+1=akk−6k+12
See Also
diff
Int
Student
Student[ODEs]
Student[ODEs][ODESteps]
Download Help Document