Skip to content
DeepForgeby svx
All problems
EasyCalculusca-055

Laplace Transform of Exponential

Problem

Return the Laplace transform of f(t) = e^(a*t) evaluated at s:

F(s) = integral from 0 to infinity of e^(-s*t) * e^(a*t) dt = 1 / (s - a)

Assume s > a so the integral converges.

Hint

Combine the exponentials into e^(-(s - a)t) and integrate.

Test cases

case 1
in: [2,3]
expected: 1
case 2
in: [0,1]
expected: 1
case 3
in: [-1,2]
expected: 0.3333333333333333
case 4
in: [2.5,5]
expected: 0.4
Starter codePython
def laplace_exp(a, s):
    # Your code here
    pass

4 test cases · run your code against them in the editor