y(x) and y cannot both appear in ODE - Maple Help

Home : Support : Online Help : System : Error Message Guide : y(x) and y cannot both appear in ODE

Error, (in dsolve) y(x) and y cannot both appear in the given ODE

 Description This error occurs when both and appear in an ordinary differential equation (ODE), resulting in an ambiguous equation which could mean (for instance) that either the ODE  or the ODE is used.

Examples

Example 1
Specifying an equation containing both the function $y\left(t\right)$ and the constant/parameter is ambiguous because it is not clear whether the ODE  or is intended to be used.

 > $\mathrm{dsolve}\left(\mathrm{diff}\left(y\left(x\right),x\right)+y=0\right)$

Solution:

Remove the ambiguity by replacing with $y\left(x\right)$.

 > $\mathrm{dsolve}\left(\mathrm{diff}\left(y\left(x\right),x\right)+y\left(x\right)=0\right)$
 ${y}\left({x}\right){=}{\mathrm{_C1}}{{ⅇ}}^{{-}{x}}$ (2.1)

Example 2

Similarly, in the following example, it is unclear whether the ODE is meant to be  or

 > $\mathrm{ode}:={x}^{2}\left(\frac{{ⅆ}^{2}}{ⅆ{t}^{2}}y\left(t\right)\right)-3x\left(\frac{ⅆ}{ⅆt}y\left(t\right)\right)+2y={x}^{2}$
 ${\mathrm{ode}}{:=}{{x}}^{{2}}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}{y}\left({t}\right)\right){-}{3}{x}\left(\frac{{ⅆ}}{{ⅆ}{t}}{y}\left({t}\right)\right){+}{2}{y}{=}{{x}}^{{2}}$ (2.2)
 >
 ${\mathrm{IC}}{:=}{y}\left({0}\right){=}{7}{,}{\mathrm{D}}\left({y}\right)\left({1}\right){=}{2}$ (2.3)
 >

Solution:

Remove the ambiguity by replacing in with $y\left(t\right)$.

 > $\mathrm{ode}:={x}^{2}\left(\frac{{ⅆ}^{2}}{ⅆ{t}^{2}}y\left(t\right)\right)-3x\left(\frac{ⅆ}{ⅆt}y\left(t\right)\right)+2y\left(t\right)={x}^{2}$
 ${\mathrm{ode}}{:=}{{x}}^{{2}}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}{y}\left({t}\right)\right){-}{3}{x}\left(\frac{{ⅆ}}{{ⅆ}{t}}{y}\left({t}\right)\right){+}{2}{y}\left({t}\right){=}{{x}}^{{2}}$ (2.4)
 >
 ${\mathrm{IC}}{:=}{y}\left({0}\right){=}{7}{,}{\mathrm{D}}\left({y}\right)\left({1}\right){=}{2}$ (2.5)
 >
 ${y}\left({t}\right){=}\frac{{1}}{{2}}{{x}}^{{2}}{+}\frac{{1}}{{2}}\frac{\left({4}{x}{-}{14}{{ⅇ}}^{\frac{{1}}{{x}}}{+}{{ⅇ}}^{\frac{{1}}{{x}}}{{x}}^{{2}}\right){{ⅇ}}^{\frac{{2}{t}}{{x}}}}{{2}{{ⅇ}}^{\frac{{2}}{{x}}}{-}{{ⅇ}}^{\frac{{1}}{{x}}}}{-}\frac{{{ⅇ}}^{\frac{{t}}{{x}}}\left({-}{14}{{ⅇ}}^{\frac{{2}}{{x}}}{+}{{x}}^{{2}}{{ⅇ}}^{\frac{{2}}{{x}}}{+}{2}{x}\right)}{{2}{{ⅇ}}^{\frac{{2}}{{x}}}{-}{{ⅇ}}^{\frac{{1}}{{x}}}}$ (2.6)