laplace and ilaplace take one, two or three arguments :
an expression and optionally the name(s) of the variable(s).
The expression is an expression of the current variable (here x) or an
expression of the variable given as second argument.
laplace returns the Laplace transform of the expression given as argument
and ilaplace the inverse Laplace transform of the expression given
as argument. The result of laplace or ilaplace is expressed
in terms of the variable given as third argument if supplied
or second argument if supplied or x otherwise.
The Laplace transform (laplace) and inverse Laplace transform (ilaplace) are useful to solve linear differential equations with constant coefficients. For example :
y ′ ′ +p. y ′+q. y = f(x) |
y(0)=a, y′(0)=b |
Denoting by L the Laplace transform, the following relations hold :
|
where C is a closed contour enclosing the poles of g.
Input :
The expression (here sin(x)) is an expression of the current variable
(here x) and the answer will also be an expression of the current variable
x.
Output :
^
2+1)or :
here the variable name is t and this name is also used in the answer.
Output :
^
2+1)Or input :
here the variable name is t and the variable name of the answer is s.
Output:
^
2+1)The following properties hold :
|
If y ′ ′(x) +p y ′(x)+q y(x) = f(x), then :
|
Therefore, if a=y(0) and b=y′(0), we have
L(f)(x)=(x2+p x+q).L(y)(x)−(x+p) a−b |
and the solution of the differential equation is :
y(x)= L−1((L(f)(x)+(x+p) a +b)/(x2+p x+q)) |
Example :
Solve :
y′ ′ −6 y′+9 y = x e3. x, y(0)=c_0, y′(0)=c_1 |
Here, p=−6, q=9.
Input :
Output :
^
2-6*x+9)Input :
^
2-6*x+9)+(x-6)*c_0+c_1)/(x^
2-6*x+9))Output :
^
3-3888*x*c_0+1296*x*c_1+1296*c_0)*exp(3*x)/1296After simplification and factorization (factor command) the solution y is :
^
3+6*x*c_1)*exp(3*x)/6Note that this equation could be solved directly. Input :
Output :
^
3+6*x*c_1)/6