Programming language Python MATLAB
Preview learning notebook Download learning notebook
Preview learning mlx script Download learning mlx script
Laplace Transform English translation
Directly verify that the solution obtained by transforming a time-domain differential equation satisfies the original problem.
MATLAB: Symbolic Math Toolbox required.
If ver('symbolic') returns an empty result, install Symbolic Math Toolbox from MATLAB Add-Ons.
Before practice 01 How should values that make the denominator 0 be handled before cancellation?Description Even after cancellation simplifies an expression, values that make the original denominator 0 cannot be substituted. First identify the excluded values in the original expression.
02 Where does the initial condition enter the Laplace domain?Description Since the transform of y′ is sY(s)−y(0), the initial value remains as a separate term.
1. Checking that simplification preserves values Starting conditions D = x 2 − 2 x + 1 x 2 − 3 x + 2 D=\frac{x^2-2x+1}{x^2-3x+2} : simplify by cancellation. For value comparisons, use x ∈ { 0 , 3 } x\in\{0,3\} .
Procedure Simplify D by cancellation, and separately identify the x values that make the original denominator 0. At x ∈ { 0 , 3 } x\in\{0,3\} , check that the values before and after cancellation agree. Explain why x ∈ { 1 , 2 } x\in\{1,2\} cannot be checked in the same way. Results to retain Expressions before and after cancellation, excluded values, and substitution results at the two points. Items to record and points to check
Original expression before cancellation
Expression after cancellation
Excluded x values
Value difference at the two points Points to check Did you identify both values that make the original denominator 0? Did you avoid substituting x = 1 x=1 into the original expression based only on its simplified form? 2. Laplace transform and inverse transform Starting conditions Transform f ( t ) = e − 2 t f(t)=e^{-2t} for t>0, then take its inverse transform.
Procedure Use sym.laplace_transform and inverse_laplace_transform laplace and ilaplace to obtain the transform and inverse transform. Compare the original and recovered function values at t ∈ { .5 , 1 , 2 } t\in\{.5,1,2\} . Explain how the pole −2 of the transformed expression relates to the time-domain decay term e − 2 t e^{-2t} . Results to retain A short table of F(s), the recovered function, and numerical differences. Items to record and points to check
Function
F(s)
Inverse transform
Maximum numerical error Points to check Did you record the positive assumption for t and the initial condition? At the same t>0, is the numerical error between the original function and its inverse transform at most 1e-8? 3. Differential equations with initial conditions Starting conditions y ̇ + 2 y = 1 \dot y+2y=1 ; compare y(0)=0 with y(0)=1. The input is a unit step for t≥0.
Procedure Write the Laplace transform of the derivative term and substitute the initial condition to obtain ( s + 2 ) Y ( s ) = 1 s + y ( 0 ) (s+2)Y(s)=\frac1s+y(0) . Divide both sides of this equation by s + 2 s+2 to obtain Y ( s ) Y(s) . Substitute each initial condition, take the inverse transform, and plot both y ( t ) y(t) over 0 ≤ t ≤ 4 0\le t\le4 s together. For each y ( t ) y(t) , calculate d y d t + 2 y − 1 \frac{dy}{dt}+2y-1 and y ( 0 ) − y 0 y(0)-y_0 . Record both residuals for each initial condition and determine whether they are 0. Results to retain Two response curves, a residual table, and a brief explanation of the initial condition's role. Items to record and points to check
y(0)
Y(s)
Initial-value residual
ODE residual
Steady-state value Points to check Did the input and initial condition enter as separate terms? Is the symbolic residual 0, and do both responses have the same steady-state value?