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

Online Help

All Products    Maple    MapleSim


dsolve/piecewise

find solution of ordinary differential equations with piecewise coefficients

 

Description

Examples

Description

• 

The dsolve function solves differential equations with piecewise coefficients. It solves general first order linear, linear constant coefficient with piecewise perturbation, and Riccati equations. It can handle some cases where the differential equation is solved by integration or variation of parameters.

• 

The solutions are found in terms of distribution theory and translated into a piecewise expression.

• 

You can verify a solution by substituting the solution into the equation. However, if the differential equation has jump discontinuities, the verification must be done in terms of Heaviside functions because the derivative at a discontinuous point is undefined in the piecewise function.

• 

The theory is based on the dissertation Martin von Mohrenschildt. "Symbolic Solutions of Discontinuous Differential Equations." Swiss Federal Institute of Technology ETHZ No. 10768

Examples

First Order:

FOdiffyx&comma;x+piecewisex<0&comma;xx&comma;0<x&comma;3xyx=0

FO&DifferentialD;&DifferentialD;xyx+x2x<03x0<xyx=0

(1)

dsolveFO

yx=&ExponentialE;x33c__1x<0&ExponentialE;3x22c__10x

(2)

Linear with discontinuous perturbation:

odediffyx&comma;`$`x&comma;2+yx=piecewisex<0&comma;1&comma;x<1&comma;1&comma;x<2&comma;sinx

ode&DifferentialD;2&DifferentialD;x2yx+yx=−1x<01x<1sinxx<2

(3)

soldsolveode

solyx=sinxc__2+cosxc__11x<0sinxc__2+cosxc__1+12cosxx<1sinxc__2+cosxc__1cosxx2+sinx4+cosx1+sinx243cosx2x<2sinxc__2+cosxc__1+cosx1+sinx245cosx2sinx442x

(4)

Solutions can also be tested by using odetest.

odetestsol&comma;ode

undefinedx=0x=1x=20otherwise

(5)

Non linear:

odediffyx&comma;x=convertsignumxabs1absx&comma;piecewiseyx2

ode&DifferentialD;&DifferentialD;xyx=1xx−1x+1x<00x=0x1x<11x1xyx2

(6)

soldsolveode

solyx=2x22c__12xx<−12x22c__1+2x+2x<02x22c__12x+2x<12x22c__1+2x1x

(7)

odetestsol&comma;ode

undefinedx=00otherwise

(8)

See Also

convert[Heaviside]

convert[piecewise]

dsolve

dsolve[taylorseries]

odetest

piecewise