ByUndeterminedCoefficients - Maple Help

Home : Support : Online Help : Education : Student Packages : ODEs : Computation : Solve : ByUndeterminedCoefficients

Student[ODEs][Solve]

 ByUndeterminedCoefficients
 Solve a linear ODE by the method of undetermined coefficients

 Calling Sequence ByUndeterminedCoefficients(ODESYS, y(x))

Parameters

 ODE - equation; a linear ordinary differential equation y - name; the dependent variable x - name; the independent variable

Description

 • The ByUndeterminedCoefficients(ODE, y(x)) command finds the solution of a linear ODE by the method of undetermined coefficients.

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)+2\mathrm{diff}\left(y\left(x\right),x\right)+2y\left(x\right)=\mathrm{sin}\left(x\right)$
 ${\mathrm{ode1}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}{y}{}\left({x}\right){=}{\mathrm{sin}}{}\left({x}\right)$ (1)
 > $\mathrm{ByUndeterminedCoefficients}\left(\mathrm{ode1},y\left(x\right)\right)$
 ${{y}}_{{p}}{}\left({x}\right){=}{-}\frac{{2}{}{\mathrm{cos}}{}\left({x}\right)}{{5}}{+}\frac{{\mathrm{sin}}{}\left({x}\right)}{{5}}$ (2)
 > $\mathrm{ode2}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+4\mathrm{diff}\left(y\left(x\right),x\right)+4y\left(x\right)=\mathrm{exp}\left(-2x\right)$
 ${\mathrm{ode2}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}{y}{}\left({x}\right){=}{{ⅇ}}^{{-}{2}{}{x}}$ (3)
 > $\mathrm{ByUndeterminedCoefficients}\left(\mathrm{ode2},y\left(x\right)\right)$
 ${{y}}_{{p}}{}\left({x}\right){=}\frac{{{ⅇ}}^{{-}{2}{}{x}}{}{{x}}^{{2}}}{{2}}$ (4)
 > $\mathrm{ode3}≔\mathrm{diff}\left(y\left(x\right),x,x\right)-4\mathrm{diff}\left(y\left(x\right),x\right)+4y\left(x\right)={x}^{2}$
 ${\mathrm{ode3}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}{y}{}\left({x}\right){=}{{x}}^{{2}}$ (5)
 > $\mathrm{ByUndeterminedCoefficients}\left(\mathrm{ode3},y\left(x\right)\right)$
 ${{y}}_{{p}}{}\left({x}\right){=}\frac{{1}}{{4}}{}{{x}}^{{2}}{+}\frac{{1}}{{2}}{}{x}{+}\frac{{3}}{{8}}$ (6)

Compatibility

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