ByPerturbation - Maple Help

Student[ODEs][Solve]

 ByPerturbation
 Solve a second order ODE by the perturbation method

 Calling Sequence ByPerturbation(ODE, IC, y(x), epsilon, n)

Parameters

 ODE - a second order ordinary differential equation by the perturbation method IC - set; a set of initial conditions y - name; the dependent variable x - name; the independent variable epsilon - name; the perturbation parameter n - positive integer; the order of the approximation

Description

 • The ByPerturbation(ODE, y(x)) command finds the solution of a second order ODE by the perturbation method.
 • Use the option output=steps to make this command return an annotated step-by-step solution.  Further control over the format and display of the step-by-step solution is available using the options described in Student:-Basics:-OutputStepsRecord.  The options supported by that command can be passed to this one.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{ODEs}\right]\left[\mathrm{Solve}\right]\right):$
 > $\mathrm{ode1}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+y\left(x\right)-\mathrm{sin}\left(\mathrm{\epsilon }y\left(x\right)\right)=0$
 ${\mathrm{ode1}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{y}{}\left({x}\right){-}{\mathrm{sin}}{}\left({\mathrm{\epsilon }}{}{y}{}\left({x}\right)\right){=}{0}$ (1)
 > $\mathrm{ic1}≔\left\{\mathrm{eval}\left(\mathrm{diff}\left(y\left(x\right),x\right),x=0\right)=1,y\left(0\right)=0\right\}$
 ${\mathrm{ic1}}{≔}\left\{\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{1}{,}{y}{}\left({0}\right){=}{0}\right\}$ (2)
 > $\mathrm{ByPerturbation}\left(\mathrm{ode1},\mathrm{ic1},y\left(x\right),\mathrm{\epsilon },3\right)$
 $\left[{y}{}\left({\mathrm{\tau }}\right){=}{\mathrm{sin}}{}\left({\mathrm{\tau }}\right){+}\frac{{{\mathrm{sin}}{}\left({\mathrm{\tau }}\right)}^{{3}}{}{{\mathrm{\epsilon }}}^{{3}}}{{48}}{+}{\mathrm{O}}{}\left({{\mathrm{\epsilon }}}^{{4}}\right){,}{\mathrm{\tau }}{=}\left({-}\frac{{{\mathrm{\epsilon }}}^{{2}}}{{8}}{-}\frac{{\mathrm{\epsilon }}}{{2}}{+}{1}{+}{\mathrm{O}}{}\left({{\mathrm{\epsilon }}}^{{4}}\right)\right){}{x}\right]$ (3)
 > $\mathrm{ode2}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+4y\left(x\right)+2\mathrm{diff}\left(y\left(x\right),x\right)+\mathrm{\epsilon }y\left(x\right)+\mathrm{cos}\left(\mathrm{\epsilon }y\left(x\right)\right)=0$
 ${\mathrm{ode2}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}{y}{}\left({x}\right){+}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{\mathrm{\epsilon }}{}{y}{}\left({x}\right){+}{\mathrm{cos}}{}\left({\mathrm{\epsilon }}{}{y}{}\left({x}\right)\right){=}{0}$ (4)
 > $\mathrm{ic2}≔\left\{\mathrm{eval}\left(\mathrm{diff}\left(y\left(x\right),x\right),x=0\right)=0,y\left(0\right)=-\frac{1}{4}\right\}$
 ${\mathrm{ic2}}{≔}\left\{\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{0}{,}{y}{}\left({0}\right){=}{-}\frac{{1}}{{4}}\right\}$ (5)
 > $\mathrm{ByPerturbation}\left(\mathrm{ode2},\mathrm{ic2},y\left(x\right),\mathrm{\epsilon },1\right)$
 ${y}{}\left({x}\right){=}{-}\frac{{1}}{{4}}{+}\left({-}\frac{{{ⅇ}}^{{-}{x}}{}{\mathrm{sin}}{}\left(\sqrt{{3}}{}{x}\right){}\sqrt{{3}}}{{48}}{-}\frac{{{ⅇ}}^{{-}{x}}{}{\mathrm{cos}}{}\left(\sqrt{{3}}{}{x}\right)}{{16}}{+}\frac{{1}}{{16}}\right){}{\mathrm{\epsilon }}$ (6)
 > $\mathrm{ode3}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+y\left(x\right)+\mathrm{\epsilon }{y\left(x\right)}^{3}=0$
 ${\mathrm{ode3}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{y}{}\left({x}\right){+}{\mathrm{\epsilon }}{}{{y}{}\left({x}\right)}^{{3}}{=}{0}$ (7)
 > $\mathrm{ic3}≔\left\{\mathrm{eval}\left(\mathrm{diff}\left(y\left(x\right),x\right),x=0\right)=0,y\left(0\right)=1\right\}$
 ${\mathrm{ic3}}{≔}\left\{\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{0}{,}{y}{}\left({0}\right){=}{1}\right\}$ (8)
 > $\mathrm{ByPerturbation}\left(\mathrm{ode3},\mathrm{ic3},y\left(x\right),\mathrm{\epsilon },2\right)$
 $\left[{y}{}\left({\mathrm{\tau }}\right){=}{\mathrm{cos}}{}\left({\mathrm{\tau }}\right){-}\frac{{\mathrm{cos}}{}\left({\mathrm{\tau }}\right){}{{\mathrm{sin}}{}\left({\mathrm{\tau }}\right)}^{{2}}{}{\mathrm{\epsilon }}}{{8}}{+}\frac{{{\mathrm{sin}}{}\left({\mathrm{\tau }}\right)}^{{2}}{}\left({-}{{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}^{{3}}{+}\frac{{25}{}{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}{{4}}\right){}{{\mathrm{\epsilon }}}^{{2}}}{{64}}{+}{\mathrm{O}}{}\left({{\mathrm{\epsilon }}}^{{3}}\right){,}{\mathrm{\tau }}{=}\left({-}\frac{{21}{}{{\mathrm{\epsilon }}}^{{2}}}{{256}}{+}\frac{{3}{}{\mathrm{\epsilon }}}{{8}}{+}{1}{+}{\mathrm{O}}{}\left({{\mathrm{\epsilon }}}^{{3}}\right)\right){}{x}\right]$ (9)
 > $\mathrm{ode4}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+\left(-\mathrm{\epsilon }x+1\right)y\left(x\right)=0$
 ${\mathrm{ode4}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}\left({-}{\mathrm{\epsilon }}{}{x}{+}{1}\right){}{y}{}\left({x}\right){=}{0}$ (10)
 > $\mathrm{ic4}≔\left\{\mathrm{eval}\left(\mathrm{diff}\left(y\left(x\right),x\right),x=0\right)=0,y\left(0\right)=1\right\}$
 ${\mathrm{ic4}}{≔}\left\{\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{0}{,}{y}{}\left({0}\right){=}{1}\right\}$ (11)
 > $\mathrm{ByPerturbation}\left(\mathrm{ode4},\mathrm{ic4},y\left(x\right),\mathrm{\epsilon },2\right)$
 ${y}{}\left({x}\right){=}{\mathrm{cos}}{}\left({x}\right){+}\left(\frac{{\mathrm{cos}}{}\left({x}\right){}{x}}{{4}}{+}\frac{{\mathrm{sin}}{}\left({x}\right){}{{x}}^{{2}}}{{4}}{-}\frac{{\mathrm{sin}}{}\left({x}\right)}{{4}}\right){}{\mathrm{\epsilon }}{-}\frac{{x}{}\left(\left({{x}}^{{3}}{-}{7}{}{x}\right){}{\mathrm{cos}}{}\left({x}\right){+}{\mathrm{sin}}{}\left({x}\right){}\left({-}\frac{{10}{}{{x}}^{{2}}}{{3}}{+}{7}\right)\right){}{{\mathrm{\epsilon }}}^{{2}}}{{32}}$ (12)

Compatibility

 • The Student[ODEs][Solve][ByPerturbation] command was introduced in Maple 2021.