y(x) and y cannot both appear in ODE - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


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

Examples

Description

This error occurs when both yx and y appear in an ordinary differential equation (ODE), resulting in an ambiguous equation which could mean (for instance) that either the ODE y'+y=0  or the ODE y'+constant=0 is used.

Examples

Example 1
Specifying an equation containing both the function yt and the constant/parameter y is ambiguous because it is not clear whether the ODE y'+y=0  or y'+constant=0 is intended to be used.

dsolvediffyx,x+y=0

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

 

Solution:

Remove the ambiguity by replacing y with yx.

dsolvediffyx,x+yx=0

yx=_C1ⅇx

(2.1)


Example 2

Similarly, in the following example, it is unclear whether the ODE is meant to be x2y'3 x y'+2 y=x2 or x2y'3 x y'+2 constant=x2. 

 

ode:=x2ⅆ2ⅆt2yt3xⅆⅆtyt+2y=x2

ode:=x2ⅆ2ⅆt2yt3xⅆⅆtyt+2y=x2

(2.2)

IC  y0 = 7, Dy1 = 2

IC:=y0=7,Dy1=2

(2.3)

dsolveode, IC, yt

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

 

Solution:

Remove the ambiguity by replacing y in ode with yt.

 

ode:=x2ⅆ2ⅆt2yt3xⅆⅆtyt+2yt=x2

ode:=x2ⅆ2ⅆt2yt3xⅆⅆtyt+2yt=x2

(2.4)

IC  y0 = 7, Dy1 = 2

IC:=y0=7,Dy1=2

(2.5)

dsolveode, IC, yt

yt=12x2+124x14ⅇ1x+ⅇ1xx2ⅇ2tx2ⅇ2xⅇ1xⅇtx14ⅇ2x+x2ⅇ2x+2x2ⅇ2xⅇ1x

(2.6)

See Also

dsolve

diff