y(x) and y cannot both appear in ODE - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

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

y⁡x=_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ⅆt2⁢y⁡t−3⁢x⁢ⅆⅆt⁢y⁡t+2⁢y=x2

ode:=x2⁢ⅆ2ⅆt2⁢y⁡t−3⁢x⁢ⅆⅆt⁢y⁡t+2⁢y=x2

(2.2)
> 

IC ≔ y0 = 7, Dy1 = 2

IC:=y⁡0=7,D⁡y⁡1=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ⅆt2⁢y⁡t−3⁢x⁢ⅆⅆt⁢y⁡t+2⁢y⁡t=x2

ode:=x2⁢ⅆ2ⅆt2⁢y⁡t−3⁢x⁢ⅆⅆt⁢y⁡t+2⁢y⁡t=x2

(2.4)
> 

IC ≔ y0 = 7, Dy1 = 2

IC:=y⁡0=7,D⁡y⁡1=2

(2.5)
> 

dsolveode, IC, yt

y⁡t=12⁢x2+12⁢4⁢x−14⁢ⅇ1x+ⅇ1x⁢x2⁢ⅇ2⁢tx2⁢ⅇ2x−ⅇ1x−ⅇtx⁢−14⁢ⅇ2x+x2⁢ⅇ2x+2⁢x2⁢ⅇ2x−ⅇ1x

(2.6)

See Also

dsolve

diff