ByPerturbation - Maple Help

Student[ODEs][Solve]

 ByPerturbation
 Solve a second order ODE by the perturbation method

 Calling Sequence ByPerturbation(ODE, y(x))

Parameters

 ODE - a second order ordinary differential equation by the perturbation method y - name; the dependent variable x - name; the independent variable

Description

 • The ByPerturbation(ODE, y(x)) command finds the solution of a second order ODE by the perturbation method.

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)$
 ${y}{}\left({\mathrm{\tau }}\right){=}{\mathrm{sin}}{}\left({\mathrm{\tau }}\right){+}{{\mathrm{\epsilon }}}^{{3}}{}\left(\frac{{\mathrm{sin}}{}\left({\mathrm{\tau }}\right)}{{48}}{-}\frac{{\mathrm{sin}}{}\left({\mathrm{\tau }}\right){}{{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}^{{2}}}{{48}}\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}}{+}{\mathrm{\epsilon }}{}\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)$ (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)$
 ${y}{}\left({\mathrm{\tau }}\right){=}{\mathrm{cos}}{}\left({\mathrm{\tau }}\right){+}{\mathrm{\epsilon }}{}\left({-}\frac{{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}{{8}}{+}\frac{{{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}^{{3}}}{{8}}\right){+}{{\mathrm{\epsilon }}}^{{2}}{}\left(\frac{{25}{}{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}{{256}}{+}\frac{{{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}^{{5}}}{{64}}{-}\frac{{29}{}{{\mathrm{cos}}{}\left({\mathrm{\tau }}\right)}^{{3}}}{{256}}\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){+}{\mathrm{\epsilon }}{}\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){-}\frac{{{\mathrm{\epsilon }}}^{{2}}{}{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)}{{32}}$ (12)

Compatibility

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