ByUndeterminedCoefficients - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

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(ODE, 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. This method is applicable when the coefficients of y(x) and its derivatives are constant and the forcing function is of a certain form, typically involving polynomials, exponentials, and trigonometric functions. This method works by determining the general form of a particular solution based on the form of the forcing function, substituting the proposed particular solution into the ODE, and solving for the undetermined coefficients.
 • 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}}_{\mathrm{ODEs}}}_{\mathrm{Solve}}\right):$
 > $\mathrm{ode1}≔\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)+2\left(\frac{ⅆ}{ⅆx}y\left(x\right)\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}≔\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)+4\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)+4y\left(x\right)={ⅇ}^{-2x}$
 ${\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{{{x}}^{{2}}{}{{ⅇ}}^{{-}{2}{}{x}}}{{2}}$ (4)
 > $\mathrm{ode3}≔\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)-4\left(\frac{ⅆ}{ⅆx}y\left(x\right)\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.
 • For more information on Maple 2021 changes, see Updates in Maple 2021.
 • The Student[ODEs][Solve][ByUndeterminedCoefficients] command was updated in Maple 2022.
 • The output option was introduced in Maple 2022.
 • For more information on Maple 2022 changes, see Updates in Maple 2022.