-
Book Overview & Buying
-
Table Of Contents
Sage Beginner's Guide
By :
Evaluate the following code to see how to compute Laplace transforms with Sage:
var('t, a, k, s')
print("Elementary transform:")
f(t) = sin(k * t)
F(s) = f.laplace(t, s)
F.show()
print("Inverse transform:")
G(s) = 1 / ((s - 1) * (s + 2) * (s + 4))
G.show()
g(t) = G.inverse_laplace(s, t)
g.show()The results are shown in the following screenshot:

We used Sage to compute the Laplace transform and the inverse Laplace transform. Normally, finding the Laplace transform would have required looking up the elementary forms in a table. Computing the inverse transform requires performing a partial fraction expansion and then finding the resulting terms in a table. The process is much faster with Sage, and Sage can compute transforms that cannot practically be computed by hand. We used the
laplace method to compute the forward transform, and inverse_laplace to compute the reverse transform. Each of these methods computes the transform...
Change the font size
Change margin width
Change background colour