IntegratingFactor - Maple Help

Home : Support : Online Help : Education : Student Packages : ODEs : IntegratingFactor

Student[ODEs]

 IntegratingFactor
 find an integrating factor for an ODE

 Calling Sequence IntegratingFactor(ODE, y(x))

Parameters

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

Description

 • IntegratingFactor(ODE, y(x)) attempts to find an integrating factor for an ODE.
 • Multiplying by the integrating factor makes the ODE exact, that is, a total derivative with respect to x. The new equation can then be solved by simply integrating with respect to x.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{ODEs}\right]\right):$
 > $\mathrm{ode1}≔\mathrm{diff}\left(z\left(t\right),t\right)\left(t-1\right){z\left(t\right)}^{2}=-{t}^{2}\left(z\left(t\right)+1\right)$
 ${\mathrm{ode1}}{≔}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){}\left({t}{-}{1}\right){}{{z}{}\left({t}\right)}^{{2}}{=}{-}{{t}}^{{2}}{}\left({z}{}\left({t}\right){+}{1}\right)$ (1)
 > $\mathrm{μ1}≔\mathrm{IntegratingFactor}\left(\mathrm{ode1},z\left(t\right)\right)$
 ${\mathrm{μ1}}{≔}\frac{{1}}{\left({z}{}\left({t}\right){+}{1}\right){}\left({t}{-}{1}\right)}$ (2)
 > $\mathrm{exact_ode1}≔\mathrm{μ1}\mathrm{ode1}$
 ${\mathrm{exact_ode1}}{≔}\frac{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){}{{z}{}\left({t}\right)}^{{2}}}{{z}{}\left({t}\right){+}{1}}{=}{-}\frac{{{t}}^{{2}}}{{t}{-}{1}}$ (3)
 > $\mathrm{Integrate}\left(\mathrm{exact_ode1},z\left(t\right)\right)$
 $\frac{{{z}{}\left({t}\right)}^{{2}}}{{2}}{-}{z}{}\left({t}\right){+}{\mathrm{ln}}{}\left({z}{}\left({t}\right){+}{1}\right){=}{-}\frac{{{t}}^{{2}}}{{2}}{-}{t}{-}{\mathrm{ln}}{}\left({t}{-}{1}\right){+}{\mathrm{_C1}}$ (4)
 > $\mathrm{ode2}≔\mathrm{diff}\left(y\left(x\right),x,x,x\right)=\frac{\left(x\mathrm{diff}\left(y\left(x\right),x\right)+y\left(x\right)\right)\mathrm{diff}\left(y\left(x\right),x,x\right)}{y\left(x\right)x}$
 ${\mathrm{ode2}}{≔}\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{\left({x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{y}{}\left({x}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{{y}{}\left({x}\right){}{x}}$ (5)
 > $\mathrm{μ2}≔\mathrm{IntegratingFactor}\left(\mathrm{ode2},y\left(x\right)\right)$
 ${\mathrm{μ2}}{≔}\frac{{1}}{{y}{}\left({x}\right){}{x}}$ (6)
 > $\mathrm{exact_ode2}≔\mathrm{μ2}\mathrm{ode2}$
 ${\mathrm{exact_ode2}}{≔}\frac{\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{y}{}\left({x}\right){}{x}}{=}\frac{\left({x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{y}{}\left({x}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{{{y}{}\left({x}\right)}^{{2}}{}{{x}}^{{2}}}$ (7)
 > $\mathrm{sol}≔\mathrm{Integrate}:-\mathrm{Apply}\left(\mathrm{exact_ode2},y\left(x\right)\right)$
 ${\mathrm{sol}}{≔}{\int }\left(\frac{\left({x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{y}{}\left({x}\right)\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{{{y}{}\left({x}\right)}^{{2}}{}{{x}}^{{2}}}{-}\frac{\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{y}{}\left({x}\right){}{x}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{\int }{0}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}$ (8)
 > $\mathrm{Integrate}:-\mathrm{Evaluate}\left(\mathrm{sol}\right)$
 ${-}\frac{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{y}{}\left({x}\right){}{x}}{=}{\mathrm{_C1}}$ (9)

Compatibility

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