DEtools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : DEtools : Linear DE Manipulation : DEtools/varparam

DEtools

  

varparam

  

find the general solution of an ODE by the method of variation of parameters

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

varparam(sols, v, ivar)

Parameters

sols

-

list of solutions to the corresponding homogeneous equation

v

-

right hand side of the original ODE

ivar

-

independent variable

true

-

(optional) flag to return only the particular solution

Description

• 

The varparam routine is used to find a general solution of an ordinary differential equation (ODE) by the method of variation of parameters.  In the event that no solution form can be generated (that is, if the Wronskian of the solution list sols is zero), then FAIL is returned. Otherwise, an general solution is generated, with indexed global constants _C.

• 

The list sols must be a list of linearly independent solutions to a corresponding homogeneous ODE. The second argument, v, is the right-hand-side of a linear ODE where it is assumed that the coefficient of the highest derivative is equal to one. If this right-hand-side is zero, then 0 is the only particular solution.

• 

If a fourth argument true is added, the routine returns only the particular solution.

• 

This function is part of the DEtools package, and so it can be used in the form varparam(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[varparam](..).

Examples

withDEtools:

Here is an example using the general formula in the order 2 case:

varparamu1x,u2x,gx,x

_C1u1x+_C2u2xu2xgxu1xⅆⅆxu2xu2xⅆⅆxu1xⅆxu1x+u1xgxu2xⅆⅆxu1xu1xⅆⅆxu2xⅆxu2x

(1)

You can obtain a specific particular solution in the order 2 case:

varparamu1x,u2x,gx,x,true

u2xgxu1xⅆⅆxu2xu2xⅆⅆxu1xⅆxu1x+u1xgxu2xⅆⅆxu1xu1xⅆⅆxu2xⅆxu2x

(2)

deⅆ2ⅆx2Yx+Yx:

solsdsolvede,Yx,output=basis

solssinx,cosx

(3)

varparamsols,cscx,x

_C1sinx+_C2cosxlncscxsinxxcosx

(4)

Here is another way to get the same information:

dsolvede=cscx,Yx

Yx=sinx_C2+cosx_C1ln1sinxsinxxcosx

(5)

As a second example, consider the ODE D2zx3Dzx+2zx=Rhs with

Rhsxⅇx+2x:

and

solsⅇx,ⅇ2x:

The general solution is using the method of variation of parameters is:

varparamsols,Rhs,x,true

ⅇ3xx22xⅇ3x+ⅇ2xxⅇ3x+3ⅇ2x2ⅇ2x

(6)

Final example: For the ODE ⅆ3ⅆx3yx2ⅆ2ⅆx2yxⅆⅆxyx+2yx=ⅇx, sols=ⅇx,ⅇ2x,ⅇx.  The general solution is:

varparamⅇx,ⅇ2x,ⅇx,ⅇx,x

_C1ⅇx+_C2ⅇ2x+_C3ⅇxxⅇx2ⅇx4

(7)

See Also

DEtools

dsolve