Previous Up Next

5.57.2 Laplace transform and inverse Laplace transform: laplace ilaplace invlaplace

Denoting by L the Laplace transform, you get the following:

L(y)(x)=
+∞


0
exuy(u)du
L−1(g)(x)=
1
2iπ
 


C
ezxg(z)dz

where C is a closed contour enclosing the poles of g.

The laplace command finds the Laplace transform of a function.

Examples.

The ilaplace command finds the Laplace transform of a function.
invlaplace is a synonym for ilaplace.


The Laplace transform has the following properties:

L(y′)(x)=y(0)+xL(y)(x)
L(y″)(x)=y′(0)+xL(y′)(x)
 =y′(0)−xy(0)+x2L(y)(x)

These properties make the Laplace transform and inverse Laplace transform useful for solving linear differential equations with constant coefficients. For example, suppose you have

     
 y′′ +py +qy = f(x)         
 y(0)=a,  y′(0)=b          

then

L(f)(x)=L(y″+py′+qy)(x) 
 =y′(0)−xy(0)+x2L(y)(x)−py(0)+pxL(y)(x))+qL(y)(x) 
 =(x2+px+q) L(y)(x)−y′(0)−(x+p) y(0)

Therefore, if a=y(0) and b=y′(0), you get

L(f)(x)=(x2+px+q)L(y)(x)−(x+p) ab

and the solution of the differential equation is:

y(x)= L−1((L(f)(x)+(x+p) a +b)/(x2+px+q))

Example.

Solve:

y′′ −6 y+9 y  = xe3 x,    y(0)=c_0,   y(0)=c_1

Here, p=−6, q=9.
Input:

laplace(x*exp(3*x))

Output:

1
x2−6 x+9

Input:

ilaplace((1/(x^2-6*x+9)+(x-6)*c_0+c_1)/(x^2-6*x+9))

Output:

1
6

x3−18 xc0+6 xc1+6 c0
e3 x

Note that this equation could be solved directly.
Input:

desolve(y’’-6*y’+9*y=x*exp(3*x),y)

Output:

e3 x
c0x+c1
+
1
6
x3e3 x


You also can use the addtable command Laplacians of unspecified functions (see Section ‍5.26.2).


Previous Up Next