varparam - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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+u1xgxu1xⅆⅆxu2xu2xⅆⅆxu1xⅆxu2x

(1)

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

varparamu1x,u2x,gx,x,true

u2xgxu1xⅆⅆxu2xu2xⅆⅆxu1xⅆxu1x+u1xgxu1xⅆⅆxu2xu2xⅆⅆxu1xⅆxu2x

(2)

dediffYx,x,x+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=sinxc__2+cosxc__1lncscxsinxxcosx

(5)

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

Rhsxexpx+2x:

and

solsexpx,exp2x:

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

varparamsols,Rhs,x,true

ⅇ3xx2+2xⅇ3x2ⅇ2xx+2ⅇ3x3ⅇ2xⅇ2x2

(6)

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

varparamexpx,exp2x,expx,expx,x

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

(7)

See Also

DEtools

dsolve