Python Encyclopedia for Academics
  • Course Outline
  • Artificial Intelligence
    • Data Science Foundation
      • Python Programming
        • Introduction and Basics
          • Variables
          • Print Function
          • Input From User
          • Data Types
          • Type Conversion
        • Operators
          • Arithmetic Operators
          • Relational Operators
          • Bitwise Operators
          • Logical Operators
          • Assignment Operators
          • Compound Operators
          • Membership Operators
          • Identity Operators
      • Numpy
        • Vectors, Matrix
        • Operations on Matrix
        • Mean, Variance, and Standard Deviation
        • Reshaping Arrays
        • Transpose and Determinant of Matrix
      • Pandas
        • Series and DataFrames
        • Slicing, Rows, and Columns
        • Operations on DataFrames
        • Different wayes to creat DataFrame
        • Read, Write Operations with CSV files
      • Matplotlib
        • Graph Basics
        • Format Strings in Plots
        • Label Parameters, Legend
        • Bar Chart, Pie Chart, Histogram, and Scatter Plot
  • Machine Learning Algorithms
    • Regression Analysis In ML
      • Regression Analysis in Machine Learning
      • Proof of Linear Regression Formulas
      • Simple Linear Regression Implementation
      • Multiple Linear Regression
      • Advertising Dataset Example
      • Bike Sharing Dataset
      • Wine Quality Dataset
      • Auto MPG Dataset
    • Classification Algorithms in ML
      • Proof of Logistic Regression
      • Simplified Mathematical Proof of SVM
      • Iris Dataset
  • Machine Learning Laboratory
    • Lab 1: Titanic Dataset
      • Predicting Survival on the Titanic with Machine Learning
    • Lab 2: Dow Jones Index Dataset
      • Dow Jones Index Predictions Using Machine Learning
    • Lab 3: Diabetes Dataset
      • Numpy
      • Pandas
      • Matplotlib
      • Simple Linear Regression
      • Simple Non-linear Regression
      • Performance Matrix
      • Preprocessing
      • Naive Bayes Classification
      • K-Nearest Neighbors (KNN) Classification
      • Decision Tree & Random Forest
      • SVM Classifier
      • Logistic Regression
      • Artificial Neural Network
      • K means Clustering
    • Lab 4: MAGIC Gamma Telescope Dataset
      • Classification in ML-MAGIC Gamma Telescope Dataset
    • Lab 5: Seoul Bike Sharing Demand Dataset
      • Regression in ML-Seoul Bike Sharing Demand Dataset
    • Lab 6: Medical Cost Personal Datasets
      • Predict Insurance Costs with Linear Regression in Python
    • Lab 6: Predict The S&P 500 Index With Machine Learning And Python
      • Predict The S&P 500 Index With Machine Learning And Python
  • Artificial Neural Networks
    • Biological Inspiration vs. Artificial Neurons
    • Review linear algebra and calculus essentials for ANNs
    • Activation Function
  • Mathematics
    • Pre-Calculus
      • Factorials
      • Roots of Polynomials
      • Complex Numbers
      • Polar Coordinates
      • Graph of a Function
    • Calculus 1
      • Limit of a Function
      • Derivative of Function
      • Critical Points
      • Indefinite Integrals
  • Calculus 2
    • 3D Coordinates and Vectors
    • Vectors and Vector Operations
    • Lines and Planes in Space (3D)
    • Partial Derivatives
    • Optimization Problems (Maxima/Minima) in Multivariable Functions
    • Gradient Vectors
  • Engineering Mathematics
    • Laplace Transform
  • Electrical & electronics Eng
    • Resistor
      • Series Resistors
      • Parallel Resistors
    • Nodal Analysis
      • Example 1
      • Example 2
    • Transient State
      • RC Circuit Equations in the s-Domain
      • RL Circuit Equations in the s-Domain
      • LC Circuit Equations in the s-Domain
      • Series RLC Circuit with DC Source
  • Computer Networking
    • Fundamental
      • IPv4 Addressing
      • Network Diagnostics
  • Cybersecurity
    • Classical Ciphers
      • Caesar Cipher
      • Affine Cipher
      • Atbash Cipher
      • Vigenère Cipher
      • Gronsfeld Cipher
      • Alberti Cipher
      • Hill Cipher
Powered by GitBook
On this page
  • 1. What is the Laplace Transform?
  • 2. Why Use the Laplace Transform?
  • 3. Common Laplace Transform Pairs
  • Keywords
  1. Engineering Mathematics

Laplace Transform

Nerd Cafe

1. What is the Laplace Transform?

The Laplace Transform is a powerful tool used in engineering, physics, and mathematics to convert time-domain functions (typically functions of t) into frequency-domain functions (functions of s).

Definition:

The Laplace Transform of a function f(t) is defined as:

L{f(t)}=∫0∞e−stf(t)dtL\left\{ f(t) \right\}=\int_{0}^{\infty }e^{-st}f(t)dtL{f(t)}=∫0∞​e−stf(t)dt

Where:

  • f(t): time-domain function

  • F(s): Laplace-transformed function

  • s: complex frequency variable (can be s=σ+jω)

2. Why Use the Laplace Transform?

  • Converts differential equations into algebraic equations.

  • Helps in solving initial value problems.

  • Very useful in control systems, circuits, and signal processing.

3. Common Laplace Transform Pairs

Example 1

f(t)=1f(t)=1f(t)=1

A. Step-by-Step Solution

The Laplace Transform of a function f(t) is defined as:

L{f(t)}=∫0∞e−stf(t)dtL\left\{ f(t) \right\}=\int_{0}^{\infty }e^{-st}f(t)dtL{f(t)}=∫0∞​e−stf(t)dt

So, for 𝑓 (𝑡) = 1 :

L{1}=∫0∞e−stdtL\left\{ 1 \right\}=\int_{0}^{\infty }e^{-st}dtL{1}=∫0∞​e−stdt

This is a basic exponential integral. Let's evaluate it:

∫0∞e−stdt=⌊e−st−s⌋0∞\int_{0}^{\infty }e^{-st}dt=\left\lfloor \frac{e^{-st}}{-s} \right\rfloor^{\infty }_{0}∫0∞​e−stdt=⌊−se−st​⌋0∞​

As we know:

  • At 𝑡 → ∞ , 𝑒 − 𝑠 𝑡 → 0 (since 𝑠 > 0)

  • At 𝑡=0 , 𝑒−𝑠𝑡=1

So:

L{1}=(−1s×0)−(−1s×1)=1sL\left\{ 1 \right\}=(-\frac{1}{s}\times 0)-(-\frac{1}{s}\times 1)=\frac{1}{s}L{1}=(−s1​×0)−(−s1​×1)=s1​

B. Python Verification

from sympy import symbols, laplace_transform

# Define variables
t, s = symbols('t s')

# Define the function
f_t = 1

# Compute Laplace Transform
F_s = laplace_transform(f_t, t, s)
print("Laplace Transform of f(t)=1:", F_s)

C. Output:

Laplace Transform of f(t)=1: (1/s, 0, True)

Example 2

f(t)=tf(t)=tf(t)=t

A. Step-by-Step Solution

Substitute 𝑓(𝑡)=𝑡:

L{t}=∫0∞e−sttdtL\left\{ t \right\}=\int_{0}^{\infty }e^{-st}tdtL{t}=∫0∞​e−sttdt

Let’s choose:

u=t⇒du=dtdv=e−stdt⇒v=−1se−st\begin{matrix} u=t⇒du=dt \\ \\ dv=e^{-st}dt\Rightarrow v=-\frac{1}{s}e^{-st} \end{matrix}u=t⇒du=dtdv=e−stdt⇒v=−s1​e−st​

Apply the formula:

∫0∞te−stdt=[−tse−st]0∞+∫0∞1se−stdt\int_{0}^{\infty }te^{-st}dt=\left[ -\frac{t}{s}e^{-st} \right]_{0}^{\infty }+\int_{0}^{\infty }\frac{1}{s}e^{-st}dt∫0∞​te−stdt=[−st​e−st]0∞​+∫0∞​s1​e−stdt

First term:

[−tse−st]0∞=0\left[ -\frac{t}{s}e^{-st} \right]_{0}^{\infty }=0[−st​e−st]0∞​=0

Second term:

∫0∞1se−stdt=1s⌊e−st−s⌋0∞=1s(0−(−1s))=1s2\int_{0}^{\infty }\frac{1}{s}e^{-st}dt=\frac{1}{s}\left\lfloor \frac{e^{-st}}{-s} \right\rfloor_{0}^{\infty }=\frac{1}{s}(0-(-\frac{1}{s})) =\frac{1}{s^{2}}∫0∞​s1​e−stdt=s1​⌊−se−st​⌋0∞​=s1​(0−(−s1​))=s21​

B. Python Code Verification

from sympy import symbols, laplace_transform

# Define variables
t, s = symbols('t s')

# Define the function
f_t = t

# Compute Laplace Transform
F_s = laplace_transform(f_t, t, s)
print("Laplace Transform of f(t)=t:", F_s)

C. Output

Laplace Transform of f(t)=1: (s**(-2), 0, True)

Example 3

Let’s now mathematically calculate the Laplace Transform of:

f(t)=t2f(t)=t^{2}f(t)=t2

From the definition of Laplace Transform:

L{f(t)}=∫0∞e−stf(t)dtL\left\{ f(t) \right\}=\int_{0}^{\infty }e^{-st}f(t)dtL{f(t)}=∫0∞​e−stf(t)dt

Substitute 𝑓(𝑡)=𝑡2:

L{f(t)}=∫0∞e−stt2dtL\left\{ f(t) \right\}=\int_{0}^{\infty }e^{-st}t^{2}dtL{f(t)}=∫0∞​e−stt2dt

A. Step-by-Step Integration

We use integration by parts, or more efficiently, we use the gamma function property for powers of ttt.

But first, we’ll do it manually.

Let:

u=t2⇒du=2tdtdv=e−stdt⇒v=−1se−st\begin{matrix} u=t^{2}\Rightarrow du=2tdt \\ \\ dv=e^{-st}dt\Rightarrow v=-\frac{1}{s}e^{-st} \end{matrix}u=t2⇒du=2tdtdv=e−stdt⇒v=−s1​e−st​

So:

∫t2e−stdt=−1st2e−st+∫2tse−stdt\int_{}^{}t^{2}e^{-st}dt=-\frac{1}{s}t^{2}e^{-st}+\int_{}^{}\frac{2t}{s}e^{-st}dt∫​t2e−stdt=−s1​t2e−st+∫​s2t​e−stdt

Now let:

u=t⇒du=dtdv=e−stdt⇒v=−1se−st\begin{matrix} u=t\Rightarrow du=dt \\ \\ dv=e^{-st}dt\Rightarrow v=-\frac{1}{s}e^{-st} \end{matrix}u=t⇒du=dtdv=e−stdt⇒v=−s1​e−st​

So:

∫te−stdt=−tse−st+1s∫e−stdt=−tse−st−1s2e−st\int_{}^{}te^{-st}dt=-\frac{t}{s}e^{-st}+\frac{1}{s}\int_{}^{}e^{-st}dt=-\frac{t}{s}e^{-st}-\frac{1}{s^{2}}e^{-st}∫​te−stdt=−st​e−st+s1​∫​e−stdt=−st​e−st−s21​e−st

Now plug everything back in:

∫0∞t2e−stdt=[−t2se−st]0∞+[2s(−tse−st−1se−st)]0∞\int_{0}^{\infty }t^{2}e^{-st}dt=\left[ -\frac{t^{2}}{s} e^{-st}\right]_{0}^{\infty }+\left[ \frac{2}{s}(-\frac{t}{s}e^{-st}-\frac{1}{s}e^{-st}) \right]_{0}^{\infty }∫0∞​t2e−stdt=[−st2​e−st]0∞​+[s2​(−st​e−st−s1​e−st)]0∞​

All terms vanish at t→∞, and at t=0, all t-dependent terms are zero, but the constant exponential part survives. So we are left with:

L{t2}=2t3    ,    for    s>0L\left\{ t^{2} \right\}=\frac{2}{t^{3}}\;\;, \;\; for\;\;s>0L{t2}=t32​,fors>0

B. General Rule (for future use):

L{tn}=n!tn+1    ,    for    s>0L\left\{ t^{n} \right\}=\frac{n!}{t^{n+1}}\;\;, \;\; for\;\;s>0L{tn}=tn+1n!​,fors>0

So for 𝑛 = 2:

L{t2}=2t3    ,    for    s>0L\left\{ t^{2} \right\}=\frac{2}{t^{3}}\;\;, \;\; for\;\;s>0L{t2}=t32​,fors>0

C. Python Verification (SymPy)

from sympy import symbols, laplace_transform

# Define variables
t, s = symbols('t s')

# Define the function
f_t = t**2

# Compute Laplace Transform
F_s = laplace_transform(f_t, t, s)
print("Laplace Transform of f(t)=t^2:", F_s)

D. Output:

Laplace Transform of f(t)=1: (2/s**3, 0, True)

Example 4

Let's now mathematically compute the Laplace Transform of:

f(t)=ea.tf(t)=e^{a.t}f(t)=ea.t

From the definition of Laplace Transform:

L{f(t)}=∫0∞e−stf(t)dtL\left\{ f(t) \right\}=\int_{0}^{\infty }e^{-st}f(t)dtL{f(t)}=∫0∞​e−stf(t)dt

Substitute 𝑓(𝑡)=eat:

L{ea.t}=∫0∞e−steatdtL\left\{ e^{a.t} \right\}=\int_{0}^{\infty }e^{-st}e^{at}dtL{ea.t}=∫0∞​e−steatdt

A. Step-by-Step Integration

We now compute:

∫0∞e−steatdt=∫0∞e(a−s)tdt\int_{0}^{\infty }e^{-st}e^{at}dt=\int_{0}^{\infty }e^{(a-s)t}dt∫0∞​e−steatdt=∫0∞​e(a−s)tdt

B. Condition:

  • Converges if s>a, because we need (a−s)<0 so the exponential decays.

C. Integrate

∫0∞e(a−s)tdt=1a−se(a−s)t\int_{0}^{\infty }e^{(a-s)t}dt=\frac{1}{a-s}e^{(a-s)t}∫0∞​e(a−s)tdt=a−s1​e(a−s)t

D. Apply limits from 0 to ∞ .

[1a−se(a−s)t]0∞=0−1a−s=1s−a\left[ \frac{1}{a-s}e^{(a-s)t} \right]_{0}^{\infty }=0-\frac{1}{a-s}=\frac{1}{s-a}[a−s1​e(a−s)t]0∞​=0−a−s1​=s−a1​

E. Final Result:

L{eat}=1s−aL\left\{ e^{at} \right\}=\frac{1}{s-a}L{eat}=s−a1​

F. Python Verification

from sympy import symbols, laplace_transform, exp

# Define variables
t, s, a = symbols('t s a')

# Define the function
f_t = exp(a * t)

# Compute Laplace Transform
F_s = laplace_transform(f_t, t, s)
print("Laplace Transform of f(t)=e^(at):", F_s)

G. Output:

Laplace Transform of f(t)=e^(at): (1/(-a + s), re(a), True)

Keywords

Laplace Transform, Laplace integral, exponential function, sine function, cosine function, transform table, Laplace of t², Laplace of e^at, Laplace of sin(at), Laplace definition, integration by parts, complex functions, convergence condition, Laplace properties, Laplace examples, Laplace rules, symbolic math, SymPy Laplace, Python Laplace, Laplace step-by-step, nerd cafe

PreviousEngineering MathematicsNextResistor

Last updated 1 month ago