Test - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Student[ODEs]

  

Test

  

test the validity of a candidate solution to an ODE

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Test(sol, ODE, var)

Parameters

sol

-

equation, or set or list of equations; a candidate solution of an ODE or system of ODEs

ODE

-

equation, or set or list of equations; an ODE or system of ODEs

var

-

function, or set or list of functions; the dependent variable(s)

Description

• 

The Test(sol, ODE, y(x)) tests whether the candidate solution sol is in fact a valid solution of the given equation or system ODE.

• 

The equation or system ODE is evaluated using the supplied candidate solution sol, and an attempt is made to remove all occurrences of the dependent variables var and their derivatives; whatever remains is then simplified and returned.

• 

If this remainder is 0 (or a set or list of zeros), then sol is in fact a valid solution.

• 

Conversely, if sol is in fact a valid solution, then this remainder must be mathematically equivalent to 0 (or a set or list of zeros), but it may not have been simplified fully.

Examples

> 

with⁡StudentODEs:

> 

ode1≔t2⁢z⁡t+1+z⁡t2⁢t−1⁢diff⁡z⁡t,t=0

ode1≔t2⁢z⁡t+1+z⁡t2⁢t−1⁢ⅆⅆtz⁡t=0

(1)
> 

sol1≔Solve⁡ode1,z⁡t

sol1≔z⁡t22−z⁡t+ln⁡z⁡t+1=−t22−t−ln⁡t−1+c__1

(2)
> 

Test⁡sol1,ode1,z⁡t

0

(3)
> 

ode2≔diff⁡y⁡x,x,x−diff⁡y⁡x,x−x⁢exp⁡x=0

ode2≔ⅆ2ⅆx2y⁡x−ⅆⅆxy⁡x−x⁢ⅇx=0

(4)
> 

sol2≔Solve⁡ode2,y⁡x

sol2≔y⁡x=c__1+c__2⁢ⅇx+ⅇx⁢1−x+12⁢x2

(5)
> 

Test⁡sol2,ode2,y⁡x

0

(6)
> 

ode3≔diff⁡y⁡x,x,x+5⁢diff⁡y⁡x,x2y⁡x=0

ode3≔ⅆ2ⅆx2y⁡x+5⁢ⅆⅆxy⁡x2y⁡x=0

(7)
> 

sol3≔Solve⁡ode3,y⁡x

sol3≔y⁡x=c__1⁢x+c__216,y⁡x=c__1⁢x+c__216,y⁡x=c__2⁢c__1⁢x+116

(8)
> 

Test⁡sol3,ode3,y⁡x

0

(9)
> 

ode4≔x3⁢diff⁡y⁡x,x,x,x+3⁢x2⁢diff⁡y⁡x,x,x−6⁢x⁢diff⁡y⁡x,x−6⁢y⁡x=0

ode4≔x3⁢ⅆ3ⅆx3y⁡x+3⁢x2⁢ⅆ2ⅆx2y⁡x−6⁢x⁢ⅆⅆxy⁡x−6⁢y⁡x=0

(10)
> 

sol4≔Solve⁡ode4,y⁡x

sol4≔y⁡x=c__1⁢x5+c__3⁢x+c__2x2

(11)
> 

Test⁡sol4,ode4,y⁡x

0

(12)
> 

ode5≔diff⁡y1⁡x,x=7⁢y1⁡x+y2⁡x,diff⁡y2⁡x,x=−4⁢y1⁡x+3⁢y2⁡x

ode5≔ⅆⅆxy1⁡x=7⁢y1⁡x+y2⁡x,ⅆⅆxy2⁡x=−4⁢y1⁡x+3⁢y2⁡x

(13)
> 

sol5≔Solve:-System⁡ode5,output=solution

sol5≔y1⁡x=−ⅇ5⁢x⁢2⁢c__2⁢x+2⁢c__1+c__24,y2⁡x=ⅇ5⁢x⁢c__2⁢x+c__1

(14)
> 

Test⁡sol5,ode5,seq⁡yj⁡x,j=1..2

0

(15)

Compatibility

• 

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

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

odetest

Student

Student[ODEs]

Student[ODEs][Solve]