 LinearParticularSolution - Maple Help

Student[ODEs][ReduceOrder]

 LinearParticularSolution
 Reduce the order of a linear ODE using a solution of the corresponding homogeneous ODE Calling Sequence LinearParticularSolution(ODE, y(x) = homsol) LinearParticularSolution(ODE, y(x) = homsol, u(t)) Parameters

 ODE - second order linear ordinary differential equation y(x) = homsol - equation; a solution of the corresponding homogeneous ODE y - name; the original dependent variable x - name; the original independent variable u - name; the dependent variable for the reduced ODE t - name; the independent variable for the reduced ODE opts - (optional) one or more of the following equations: solve=true, output=basis. See details below. Description

 • The LinearParticularSolution(ODE, homsol) command reduces the order of a second order linear ODE using a solution of the corresponding homogeneous ODE.
 • The second argument must be a solution of the corresponding homogeneous ODE of the form y(x) = homsol, where homsol does not depend on y(x).
 • The third argument, u(t), representing the variable for the reduced ODE, is optional. If it is not given, new independent and dependent variables will be chosen which do not conflict with the existing variables.
 • The default output is a sequence consisting of the reduced ODE in terms of the new variables, followed by the transformation used to recover the original ODE from the reduced ODE.
 • If the option solve or solve=true is also given, an attempt is made to solve the reduced ODE and return the general solution to the original ODE. If successful, the general solution of the original ODE is returned.
 • If the option solve is given and, furthermore, the option output=basis is given, then as above an attempt is made to find the general solution to the original ODE, and the answer is returned in the form of a sequence. The first element of the sequence is a particular solution of the ODE, and the second element is a basis of solutions for the homogeneous solution. Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\mathrm{ODEs}}\right):$
 > $\mathrm{with}\left({{\mathrm{Student}}_{\mathrm{ODEs}}}_{\mathrm{ReduceOrder}}\right):$

Given a linear ODE:

 > $\mathrm{ode}≔\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)-y\left(x\right)=x$
 ${\mathrm{ode}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{y}{}\left({x}\right){=}{x}$ (1)

And a particular solution for the corresponding homogeneous ODE:

 > $\mathrm{homsol}≔y\left(x\right)={ⅇ}^{x}$
 ${\mathrm{homsol}}{≔}{y}{}\left({x}\right){=}{{ⅇ}}^{{x}}$ (2)

Use this homogeneous solution to find a new ODE of reduced order which can be used to solve the original:

 > $\mathrm{reduced_ode},\mathrm{tr}≔\mathrm{LinearParticularSolution}\left(\mathrm{ode},\mathrm{homsol}\right)$
 ${\mathrm{reduced_ode}}{,}{\mathrm{tr}}{≔}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({t}\right){=}{-}\frac{{2}{}{u}{}\left({t}\right){}{{ⅇ}}^{{t}}{-}{t}}{{{ⅇ}}^{{t}}}{,}\left\{{t}{=}{x}{,}{u}{}\left({t}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\left(\frac{{y}{}\left({x}\right)}{{{ⅇ}}^{{x}}}\right)\right\}$ (3)

Solve the reduced order ODE:

 > $\mathrm{reduced_sol}≔\mathrm{Solve}\left(\mathrm{reduced_ode},u\left(t\right)\right)$
 ${\mathrm{reduced_sol}}{≔}{u}{}\left({t}\right){=}\left(\left({t}{-}{1}\right){}{{ⅇ}}^{{t}}{+}{\mathrm{_C1}}\right){}{{ⅇ}}^{{-}{2}{}{t}}$ (4)

Apply the transformation to find a simpler ODE for the original variable y(x):

 > $\mathrm{new_ode}≔\mathrm{eval}\left(\mathrm{reduced_sol},\mathrm{tr}\right)$
 ${\mathrm{new_ode}}{≔}\frac{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{{ⅇ}}^{{x}}}{-}\frac{{y}{}\left({x}\right)}{{{ⅇ}}^{{x}}}{=}\left(\left({x}{-}{1}\right){}{{ⅇ}}^{{x}}{+}{\mathrm{_C1}}\right){}{{ⅇ}}^{{-}{2}{}{x}}$ (5)

Solve the simpler ODE to find the general solution of the original ODE:

 > $\mathrm{gensol1}≔\mathrm{Solve}\left(\mathrm{new_ode},y\left(x\right)\right)$
 ${\mathrm{gensol1}}{≔}{y}{}\left({x}\right){=}{\mathrm{_C2}}{}{{ⅇ}}^{{x}}{-}{x}{-}\frac{\mathrm{c__1}{}{{ⅇ}}^{{-}{x}}}{{2}}$ (6)

Alternatively, the particular homogeneous solution can be used to solve the original ODE in a single step if we use the option solve:

 > $\mathrm{gensol}≔\mathrm{LinearParticularSolution}\left(\mathrm{ode},\mathrm{homsol},'\mathrm{solve}'\right)$
 ${\mathrm{gensol}}{≔}{y}{}\left({x}\right){=}{{ⅇ}}^{{x}}{}\left({-}\frac{{{ⅇ}}^{{-}{2}{}{x}}{}\mathrm{c__1}}{{2}}{-}{{ⅇ}}^{{-}{x}}{}{x}{+}{\mathrm{_C2}}\right)$ (7)

Simplify the form of the general solution:

 > $\mathrm{simplify}\left(\mathrm{expand}\left(\mathrm{gensol}\right)\right)$
 ${y}{}\left({x}\right){=}{\mathrm{_C2}}{}{{ⅇ}}^{{x}}{-}{x}{-}\frac{\mathrm{c__1}{}{{ⅇ}}^{{-}{x}}}{{2}}$ (8)

 > $\mathrm{psol},\mathrm{basis}≔\mathrm{LinearParticularSolution}\left(\mathrm{ode},\mathrm{homsol},'\mathrm{solve}','\mathrm{output}'='\mathrm{basis}'\right)$
 ${\mathrm{psol}}{,}{\mathrm{basis}}{≔}{-}{x}{,}\left[{{ⅇ}}^{{-}{x}}{,}{{ⅇ}}^{{x}}\right]$ (9)

Show the new solution:

 > $\mathrm{sol}≔y\left(x\right)={\mathrm{remove}\left(\mathrm{=},\mathrm{basis},\mathrm{rhs}\left(\mathrm{homsol}\right)\right)}_{1}$
 ${\mathrm{sol}}{≔}{y}{}\left({x}\right){=}{{ⅇ}}^{{-}{x}}$ (10)

Calculate the Wronskian of the two solutions for y(x):

 > $W≔\mathrm{VectorCalculus}:-\mathrm{Wronskian}\left(\mathrm{basis},x\right)$
 ${W}{≔}\left[\begin{array}{cc}{{ⅇ}}^{{-}{x}}& {{ⅇ}}^{{x}}\\ {-}{{ⅇ}}^{{-}{x}}& {{ⅇ}}^{{x}}\end{array}\right]$ (11)

The determinant should be nonzero to prove independence of the solutions:

 > $\mathrm{simplify}\left(\mathrm{LinearAlgebra}:-\mathrm{Determinant}\left(W\right)\right)$
 ${2}$ (12)

Another syntax showing that you can chose the name of the variable in the reduced ODE:

 > $\mathrm{LinearParticularSolution}\left(\mathrm{ode},y\left(x\right)={ⅇ}^{-x},v\left(s\right)\right)$
 $\frac{{ⅆ}}{{ⅆ}{s}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{v}{}\left({s}\right){=}\frac{{2}{}{v}{}\left({s}\right){}{{ⅇ}}^{{-}{s}}{+}{s}}{{{ⅇ}}^{{-}{s}}}{,}\left\{{s}{=}{x}{,}{v}{}\left({s}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\left(\frac{{y}{}\left({x}\right)}{{{ⅇ}}^{{-}{x}}}\right)\right\}$ (13) Compatibility

 • The Student[ODEs][ReduceOrder][LinearParticularSolution] command was introduced in Maple 2021.