Download notebook
Inspect locally

Do not run the notebook before reviewing it. If you already hold the files, these two calls verify the archive and open KaimonSlate's inactive view, which starts no worker and evaluates no cell. The full download-to-run workflow is below.

using DocumenterSlate
verify_slate_bundle("laplace_lesson.tar.gz")
using KaimonSlate
KaimonSlate.serve_notebook("laplace_lesson.jl"; inactive = true)
Download, verify, read, then run — in that order

This notebook is arbitrary code. Instantiating its environment may run package build scripts, and live opening may execute cells. There is deliberately no one-click launch: each step below is an act you perform after reading the previous one.

1. Download

One call downloads the archive, checks every artifact against SHA256SUMS, cross-checks PROVENANCE.toml, and extracts the result. It evaluates no cell and instantiates no environment.

Copy the Download notebook link above — it is downloads/laplace_lesson/laplace_lesson.tar.gz on this site — and fetch it:

using DocumenterSlate
bundle = fetch_slate_bundle("https://<this site>/downloads/laplace_lesson/laplace_lesson.tar.gz")

2. Verify

Step 1 raises rather than returning an unverified bundle, so reaching this step means the bytes are intact. If you took the download directory instead, check it with the checksums it carries:

sha256sum -c SHA256SUMS

What checksums cannot establish, either way, is origin:

bundle.provenance["repository"]
bundle.provenance["git_sha"]
bundle.provenance["ci_produced"]

Compare repository and git_sha against the repository you actually trust, and treat ci_produced = false as a locally built bundle. Provenance is build metadata, not a signature — anyone can serve a well-formed bundle.

3. Read

A KaimonSlate notebook is plain Julia source, and reading laplace_lesson.jl is the only step that tells you what the code would actually do. KaimonSlate can also serve a static view that starts no worker and evaluates no cell:

using KaimonSlate
KaimonSlate.serve_notebook(bundle.source; inactive = true)

4. Run deliberately

Only after steps 2 and 3. Instantiating the environment may run package build scripts, and opening the notebook in live mode may execute anything. The three routes below are ordered by how much of your host they expose.

Isolated container (recommended) — keeps package installation and notebook inspection off the host. The image opens the notebook in inactive mode; it evaluates no cell:

podman build -t laplace_lesson-inspect . && podman run --rm -it -p 8765:8765 laplace_lesson-inspect

Alternatively, open devcontainer.json in a compatible editor.

Pinned host environment — uses the published project and manifest, but runs package build scripts and notebook code with your host account's permissions:

julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. -e 'using KaimonSlate; KaimonSlate.serve_notebook("laplace_lesson.jl")'

Native application — installing and opening the application executes code with your host account's permissions:

julia -e 'using Pkg; Pkg.Registry.add(Pkg.Registry.RegistrySpec(url="https://github.com/kahliburke/SlateRegistry")); Pkg.Apps.add("KaimonSlate")'
slate --own laplace_lesson.jl

A container reduces access to the host; it does not make untrusted code harmless. Review the mount and network permissions too.

Download source · Checksums · Provenance · Local instructions

ArtifactSHA-256
Dockerfiled31c65b1308c9c75658f1149ad498ef75cea1f41c8330d405c8d8ad105520a39
Manifest.tomlf2810a9c1f516c881f51e12fab61cc4585349cfe850622943394aa8a08efc065
PROVENANCE.toml40c5ca6a3c000b27474e8ee71242af56f7a2089f936b084cc2c3e0c8af0736db
Project.toml47810962ec0e39b7dd20de00dcef692ba653519f69bb872450bf0eaa67688d07
README.md7e6e1f96bbb78be5fbd0f429a56d32c0b4140f936d276dadd1898c2f6db05f9b
devcontainer.json441c16daeecacf87bd95b9800e25c8e8b4a7c785439983e980fb6a04614ec573
laplace_lesson.jl4c5e298cb974445119b5ed2a92e3a464e0198bac4c08e0dfdcf8156f8a11efde
laplace_lesson.tar.gz2780adf4bb35f840dba110c292e3d954dc02151a8a02c5a77d7933b60a348b7f
using Giac
using Giac.Commands: laplace, ilaplace, simplify, factor, partfrac, solve
using GiacSlate          # the lesson's autograder: check / grade / course_report

# Domains
@giac_var t              # time
@giac_var s              # complex frequency

# Symbolic parameters you'll use when writing answers
@giac_var a              # decay rate  (Sections 1–2)
@giac_var w              # angular frequency ω
@giac_var N0             # initial amount
@giac_var m; @giac_var b; @giac_var k   # mass, damping, stiffness

# Worked results and your answers are typeset by dropping GiacExpr values straight
# into markdown with `{{ … }}` — no LaTeX plumbing needed.
"Kernel ready — domains t, s; parameters a, w, N0, m, b, k; grader loaded."
Kernel ready — domains t, s; parameters a, w, N0, m, b, k; grader loaded.

The Laplace Transform

An interactive physics lesson, with graded exercises

A working introduction for students: learn the Laplace transform by using it to solve real physics problems — decaying charge on a capacitor, a damped oscillator, driven resonance — then check your understanding with exercises that grade themselves. Every symbolic result below is computed live by the Giac computer algebra system, so you can change a number and watch the mathematics follow.

What is the Laplace transform?

The Laplace transform sends a function of time $f(t)$ to a function of a complex variable $s$:

\[F(s) \;=\; \mathcal{L}\{f\}(s) \;=\; \int_0^{\infty} f(t)\,e^{-st}\,dt .\]

Its superpower for physics is this: differentiation in time becomes multiplication by $s$. A differential equation — the language of every mechanical, electrical, and thermal system — turns into ordinary algebra. Solve the algebra in the $s$-domain, then transform back to get the motion $x(t)$, the charge $q(t)$, the temperature $T(t)$.

We'll build the idea up through three physical systems: exponential decay, a first-order RC circuit, and the damped harmonic oscillator.

How the exercises work. Most answers are typed straight into a live math field — the little boxed giac"…" expression in each exercise cell. Click it and type your answer in ordinary math notation (fractions, powers, sin, …), or pop up the on-screen keyboard with the ⌨ button. Press <kbd>Enter</kbd> or <kbd>Tab</kbd> to commit; the check cell just below re-runs automatically and grades you. Symbolic answers go through the Giac algebra system, so any algebraically-equivalent form counts — green ✓ means you've got it. A blank field just reads as "not answered yet". A few exercises ask for a small Julia function instead (you'll see missing to replace). A running score sits at the very bottom.

Section 1 · Meeting the transform

Let's compute a couple of transforms straight from the definition so you can see the machine turning. Giac evaluates the integral $\int_0^\infty f(t)e^{-st}dt$ for us — but the point is the pattern, so keep the definition in mind.

(1/s, 1/s^2, 2/s^3)

\[\mathcal{L}\{1\} = \frac1{s} \qquad \mathcal{L}\{t\} = \frac1{s^{2}} \qquad \mathcal{L}\{t^{2}\} = \frac{2}{s^{3}}\]

Notice the pattern: each power of $t$ climbs one power of $\tfrac{1}{s}$.

Exercise 1.1 — the exponential. A decaying exponential $e^{-at}$ (a radioactive sample, a discharging capacitor) is the most important signal in physics. Give its Laplace transform as an expression in s and a.

# Click the empty math field and type L{e^{-a t}}, as an expression in s and a:
L_exp = giac""
missing
check(:lap_exp, L_exp)
Section 1 · Meeting the transform
check
✗ 1.1 · Transform of a decaying exponential — keep going
✗ $\mathcal{L}\{e^{-at}\}$: not answered yet
type your answer into the math field above
💡 Hint: From the definition $\mathcal{L}\{f\}=\int_0^\infty f(t)e^{-st}dt$, the integral of $e^{-at}e^{-st}$ is a geometric-style decay. The pole sits at $s=-a$.

Exercise 1.2 — the oscillation. Oscillations are the other half of physics. Give the Laplace transform of $\sin(\omega t)$ as an expression in s and w (use w for $\omega$).

# Click the empty math field and type L{sin(ω t)}, as an expression in s and ω:
L_sin = giac""
missing
check(:lap_sin, L_sin)
Section 1 · Meeting the transform
check
✗ 1.2 · Transform of a sine — keep going
✗ $\mathcal{L}\{\sin\omega t\}$: not answered yet
type your answer into the math field above
💡 Hint: Write $\sin(\omega t)=\tfrac{1}{2i}(e^{i\omega t}-e^{-i\omega t})$ and transform each exponential, or recall the standard pair. The denominator is $s^2+\omega^2$.

Exercise 1.3 — going back. The transform is only useful if you can return to the time domain. What time signal $f(t)$ has transform $\dfrac{s}{s^{2}+\omega^{2}}$? Give $f(t)$ as an expression in t and w.

# Type the time signal f(t) whose transform is s/(s²+w²), in terms of t and w:
f_cos = giac""
missing
check(:inv_lap, f_cos)
Section 1 · Meeting the transform
check
✗ 1.3 · An inverse transform — keep going
✗ $\mathcal{L}^{-1}\{s/(s^2+\omega^2)\}$: not answered yet
type your answer into the math field above
💡 Hint: Which time signal has transform $\dfrac{s}{s^2+\omega^2}$? Differentiate your Section-1.2 answer, or match the standard pair — no extra $1/\omega$ this time.

Section 2 · First-order systems — decay

Now the payoff. A radioactive sample loses atoms at a rate proportional to how many remain; a capacitor bleeds charge through a resistor the same way. Both obey

\[\dot y(t) = -a\,y(t), \qquad y(0) = y_0 .\]

The key transform rule is $\mathcal{L}\{\dot y\} = sY(s) - y(0)$ — the initial condition rides along for free. So the whole ODE becomes the algebraic equation

\[sY(s) - y_0 = -a\,Y(s).\]

Worked example. A hot object cools as $\dot T = -\tfrac12 T$, $T(0)=100$. Watch Giac solve it by the Laplace method:

(100/(s+1/2), 100*exp(-1/2*t))

\[sT(s) - 100 = -\tfrac{1}{2}T(s)\]

\[T(s) = \frac{100}{s+\frac1{2}}\]

\[T(t) = \mathcal{L}^{-1}\{T(s)\} = 100 \mathrm{e}^{-\frac{t}{2}}\]

The algebra happened in the $s$-domain; the last step carried us back to a cooling curve in time.

Exercise 2.1 — solve for $N(s)$. Now do it in general. For radioactive decay $\dot N = -aN,\; N(0)=N_0$, the transform gives $sN(s) - N_0 = -a\,N(s)$. Solve that for $N(s)$ (an expression in s, a, and N0).

# Solve sN(s) - N0 = -a N(s) for N(s). Type it in the field, in terms of s, a, N0:
N_s = giac""
missing
check(:decay_transform, N_s)
Section 2 · First-order systems — decay
check
✗ 2.1 · Transform the decay law — keep going
✗ $N(s)$: not answered yet
type your answer into the math field above
💡 Hint: Radioactive decay obeys $\dot N=-aN,\;N(0)=N_0$. Transforming gives $sN(s)-N_0=-aN(s)$. Solve that algebraic equation for $N(s)$.

Exercise 2.2 — back to time. Invert your $N(s) = N_0/(s+a)$ to get $N(t)$. You already found this pair in Exercise 1.1 — just carry the $N_0$ along. Give $N(t)$ as an expression in t, a, N0.

# Invert N(s) = N0/(s+a) to N(t). Type it in the field, in terms of t, a, N0:
N_t = giac""
missing
check(:decay_solution, N_t)
Section 2 · First-order systems — decay
check
✗ 2.2 · Invert to the time domain — keep going
✗ $N(t)$: not answered yet
type your answer into the math field above
💡 Hint: Take $\mathcal{L}^{-1}$ of your $N(s)=N_0/(s+a)$. It is the exponential-decay pair from 1.1, scaled by $N_0$.

Exercise 2.3 — half-life (a function). The half-life is the time for $N$ to fall to $N_0/2$. Solve $e^{-a t_{1/2}} = \tfrac12$ for $t_{1/2}$, then write it as a Julia function of the decay rate a.

# Return the half-life for decay rate a.  Replace `missing` with your formula.
function half_life(a)
    missing
end
half_life (generic function with 1 method)
check(:half_life, half_life)
Section 2 · First-order systems — decay
check
✗ 2.3 · Half-life (numeric) — keep going
✗ half-life $t_{1/2}=\ln 2/a$ — case 1: not implemented yet
replace the `missing` with your code
✗ half-life $t_{1/2}=\ln 2/a$ — case 2: not implemented yet
replace the `missing` with your code
✗ half-life $t_{1/2}=\ln 2/a$ — case 3: not implemented yet
replace the `missing` with your code
💡 Hint: Write `half_life(a)` returning the time for $N$ to fall to $N_0/2$: solve $e^{-a t}=\tfrac12$ for $t$. Answer in the same time units as $1/a$.

Section 3 · Second-order systems — oscillation

A mass on a spring with friction — and, by analogy, an RLC circuit, a suspension, a tuned instrument — obeys

\[m\ddot x + b\dot x + k x = F(t).\]

Transforming (at rest) gives $(ms^2 + bs + k)\,X(s) = F(s)$, so the system's entire personality lives in its transfer function $H(s) = X(s)/F(s)$ and the poles — the roots of $ms^2+bs+k$. Two numbers set the behaviour: the natural frequency $\omega_n=\sqrt{k/m}$ and the damping ratio $\zeta=\dfrac{b}{2\sqrt{km}}$.

Explore first. Below, Giac inverts the free response $X(s)=\dfrac{s+2\zeta\omega_n}{s^2+2\zeta\omega_n s + \omega_n^2}$ (release from $x=1$ at rest) symbolically, and we plot it. Slide $\zeta$ through $1$ and watch oscillation give way to a dead crawl.

@bind ζv  Slider(0.1, 2.0, 0.25; step=0.05, label="damping ζ")
@bind ωnv Slider(0.5, 4.0, 2.0;  step=0.1,  label="natural freq ωₙ")

# Free response X(s) = (s + 2ζωₙ) / (s² + 2ζωₙ s + ωₙ²), inverted by Giac.
Xs = Giac.giac_eval(
    "(s + 2*$(ζv)*$(ωnv)) / (s^2 + 2*$(ζv)*$(ωnv)*s + $(ωnv)^2)")
xt = build_function(ilaplace(Xs, s, t), t)

ts = collect(range(0, 12; length=400))
xs = clamp.(xt.(ts), -1.5, 1.5)
regime = ζv < 1 ? "under-damped" : ζv ≈ 1 ? "critically damped" : "over-damped"

echart(:line, ts, xs; title="Free response x(t) — $regime  (ζ=$ζv, ωₙ=$ωnv)",
       smooth=true, symbol="none", areaStyle=(opacity=0.1,),
       xAxis=(name="t",), yAxis=(name="x", min=-1.1, max=1.2),
       markLine=(silent=true, symbol="none",
                 data=[(yAxis=0, lineStyle=(type=:dashed, color="#888"))]),
       height=380)
KaimonSlate.ReportEngine.EChart(Dict{String, Any}("xAxis" => Dict{String, Any}("name" => "t"), "yAxis" => Dict{String, Any}("name" => "x", "max" => 1.2, "min" => -1.1), "animationDurationUpdate" => 300, "textStyle" => Dict{String, Any}("fontFamily" => "inherit"), "tooltip" => Dict{String, Any}("trigger" => "axis"), "title" => Dict{String, Any}("text" => "Free response x(t) — under-damped  (ζ=0.25, ωₙ=2.0)"), "__size" => Dict{String, Any}("height" => 380), "series" => Dict{String, Any}[Dict("areaStyle" => Dict{String, Any}("opacity" => 0.1), "data" => [[0.0, 1.0], [0.03007518796992481, 0.998209505129], [0.06015037593984962, 0.992915310212], [0.09022556390977443, 0.984240084767], [0.12030075187969924, 0.972314910972], [0.15037593984962405, 0.957278567359], [0.18045112781954886, 0.939276806303], [0.21052631578947367, 0.918461628072], [0.24060150375939848, 0.894990554119], [0.2706766917293233, 0.869025902239], [0.3007518796992481, 0.840734066103], [0.3308270676691729, 0.81028480162], [0.3609022556390977, 0.77785052246], [0.39097744360902253, 0.74360560698], [0.42105263157894735, 0.707725718682], [0.45112781954887216, 0.670387142227], [0.48120300751879697, 0.631766136907], [0.5112781954887218, 0.592038309362], [0.5413533834586466, 0.551378007206], [0.5714285714285714, 0.509957735109], [0.6015037593984962, 0.467947594741], [0.631578947368421, 0.425514749871], [0.6616541353383458, 0.382822917786], [0.6917293233082706, 0.340031888056], [0.7218045112781954, 0.29729706955], [0.7518796992481203, 0.254769066483], [0.7819548872180451, 0.212593284147], [0.8120300751879699, 0.170909564838], [0.8421052631578947, 0.129851854403], [0.8721804511278195, 0.0895478996692], [0.9022556390977443, 0.0501189769244], [0.9323308270676691, 0.0116796515015], [0.9624060150375939, -0.0256624316041], [0.9924812030075187, -0.0618067262562], [1.0225563909774436, -0.0966599331151], [1.0526315789473684, -0.130136117371], [1.0827067669172932, -0.162156796749], [1.112781954887218, -0.192651000353], [1.1428571428571428, -0.221555298997], [1.1729323308270676, -0.248813807776], [1.2030075187969924, -0.274378161669], [1.2330827067669172, -0.298207465077], [1.263157894736842, -0.320268216236], [1.2932330827067668, -0.340534207535], [1.3233082706766917, -0.358986402782], [1.3533834586466165, -0.375612792565], [1.3834586466165413, -0.390408228861], [1.413533834586466, -0.403374240087], [1.443609022556391, -0.414518827854], [1.4736842105263157, -0.423856246669], [1.5037593984962405, -0.431406767888], [1.5338345864661653, -0.437196429224], [1.5639097744360901, -0.441256771127], [1.593984962406015, -0.44362456137], [1.6240601503759398, -0.44434150917], [1.6541353383458646, -0.443453970169], [1.6842105263157894, -0.4410126436], [1.7142857142857142, -0.437072262954], [1.744360902255639, -0.431691281428], [1.7744360902255638, -0.424931553447], [1.8045112781954886, -0.416858013498], [1.8345864661654134, -0.407538353505], [1.8646616541353382, -0.397042699939], [1.894736842105263, -0.38544329182], [1.9248120300751879, -0.372814160728], [1.9548872180451127, -0.359230813913], [1.9849624060150375, -0.344769921533], [2.0150375939849625, -0.329509009011], [2.045112781954887, -0.313526155465], [2.075187969924812, -0.296899699098], [2.1052631578947367, -0.279707950393], [2.1353383458646618, -0.262028913902], [2.1654135338345863, -0.243940019372], [2.1954887218045114, -0.225517862883], [2.225563909774436, -0.206837958622], [2.255639097744361, -0.187974501876], [2.2857142857142856, -0.169000143735], [2.3157894736842106, -0.149985777982], [2.345864661654135, -0.131000340551], [2.3759398496240602, -0.112110621904], [2.406015037593985, -0.093381092618], [2.43609022556391, -0.0748737423955], [2.4661654135338344, -0.0566479326921], [2.4962406015037595, -0.0387602630707], [2.526315789473684, -0.0212644513587], [2.556390977443609, -0.0042112276226], [2.5864661654135337, 0.0123517580701], [2.6165413533834587, 0.0283800141816], [2.6466165413533833, 0.0438322726536], [2.6766917293233083, 0.0586705404474], [2.706766917293233, 0.0728601378876], [2.736842105263158, 0.0863697240635], [2.7669172932330826, 0.099171309582], [2.7969924812030076, 0.111240257], [2.827067669172932, 0.122555269303], [2.857142857142857, 0.133098366817], [2.887218045112782, 0.142854852993], [2.917293233082707, 0.151813269497], [2.9473684210526314, 0.159965341101], [2.9774436090225564, 0.167305910861], [3.007518796992481, 0.173832866105], [3.037593984962406, 0.179547055764], [3.0676691729323307, 0.184452199608], [3.0977443609022557, 0.188554789931], [3.1278195488721803, 0.191863986278], [3.1578947368421053, 0.194391503784], [3.18796992481203, 0.196151495717], [3.218045112781955, 0.197160430811], [3.2481203007518795, 0.197436965986], [3.2781954887218046, 0.197001815037], [3.308270676691729, 0.195877613895], [3.338345864661654, 0.194088783016], [3.3684210526315788, 0.191661387505], [3.398496240601504, 0.18862299551], [3.4285714285714284, 0.185002535464], [3.4586466165413534, 0.180830152708], [3.488721804511278, 0.176137066027], [3.518796992481203, 0.170955424604], [3.5488721804511276, 0.165318165911], [3.5789473684210527, 0.159258874989], [3.6090225563909772, 0.152811645593], [3.6390977443609023, 0.146010943645], [3.669172932330827, 0.138891473396], [3.699248120300752, 0.131488046712], [3.7293233082706765, 0.123835455847], [3.7593984962406015, 0.115968350051], [3.789473684210526, 0.107921116353], [3.819548872180451, 0.0997277647994], [3.8496240601503757, 0.0914218184436], [3.8796992481203008, 0.0830362083265], [3.9097744360902253, 0.0746031736792], [3.9398496240601504, 0.0661541675469], [3.969924812030075, 0.0577197680103], [4.0, 0.049329595155], [4.030075187969925, 0.0410122339143], [4.06015037593985, 0.0327951628865], [4.090225563909774, 0.0247046892025], [4.120300751879699, 0.0167658894984], [4.150375939849624, 0.00900255702007], [4.180451127819549, 0.0014371548686], [4.2105263157894735, -0.00590922462983], [4.2406015037593985, -0.0130168944661], [4.2706766917293235, -0.0198676014596], [4.3007518796992485, -0.026444548816], [4.330827067669173, -0.032732412827], [4.360902255639098, -0.0387173538275], [4.390977443609023, -0.0443870215395], [4.421052631578948, -0.0497305549507], [4.451127819548872, -0.0547385768909], [4.481203007518797, -0.0594031834816], [4.511278195488722, -0.0637179286485], [4.541353383458647, -0.0676778038988], [4.571428571428571, -0.0712792135753], [4.601503759398496, -0.0745199458094], [4.631578947368421, -0.0773991394043], [4.661654135338346, -0.0799172468865], [4.69172932330827, -0.0820759939711], [4.7218045112781954, -0.0838783356917], [4.7518796992481205, -0.0853284094497], [4.7819548872180455, -0.0864314852415], [4.81203007518797, -0.0871939133251], [4.842105263157895, -0.0876230695881], [4.87218045112782, -0.0877272988793], [4.902255639097745, -0.0875158565673], [4.932330827067669, -0.0869988485863], [4.962406015037594, -0.086187170227], [4.992481203007519, -0.0850924439289], [5.022556390977444, -0.0837269563241], [5.052631578947368, -0.0821035947809], [5.082706766917293, -0.0802357836854], [5.112781954887218, -0.0781374206986], [5.142857142857143, -0.0758228132156], [5.172932330827067, -0.0733066152466], [5.203007518796992, -0.0706037649339], [5.2330827067669174, -0.0677294229072], [5.2631578947368425, -0.0646989116723], [5.293233082706767, -0.0615276562197], [5.323308270676692, -0.0582311260264], [5.353383458646617, -0.0548247786187], [5.383458646616542, -0.0513240048487], [5.413533834586466, -0.0477440760302], [5.443609022556391, -0.0441000930671], [5.473684210526316, -0.040406937695], [5.503759398496241, -0.0366792259499], [5.533834586466165, -0.0329312639606], [5.56390977443609, -0.0291770061566], [5.593984962406015, -0.0254300159662], [5.62406015037594, -0.0217034290726], [5.654135338345864, -0.0180099192832], [5.684210526315789, -0.014361667055], [5.714285714285714, -0.0107703307107], [5.7443609022556394, -0.00724702036866], [5.774436090225564, -0.00380227459746], [5.804511278195489, -0.000446039799426], [5.834586466165414, 0.00281234768532], [5.864661654135339, 0.00596417677089], [5.894736842105263, 0.00900137413963], [5.924812030075188, 0.011916514113], [5.954887218045113, 0.0147028259222], [5.984962406015038, 0.0173541984303], [6.015037593984962, 0.0198651823633], [6.045112781954887, 0.0222309901179], [6.075187969924812, 0.0244474932162], [6.105263157894737, 0.026511217488], [6.135338345864661, 0.0284193360645], [6.165413533834586, 0.0301696602725], [6.195488721804511, 0.0317606285251], [6.225563909774436, 0.0331912933068], [6.2556390977443606, 0.0344613063563], [6.285714285714286, 0.0355709021529], [6.315789473684211, 0.0365208798162], [6.345864661654136, 0.0373125835295], [6.37593984962406, 0.0379478816018], [6.406015037593985, 0.0384291442821], [6.43609022556391, 0.0387592204428], [6.466165413533835, 0.0389414132484], [6.496240601503759, 0.0389794549265], [6.526315789473684, 0.0388774807569], [6.556390977443609, 0.0386400023964], [6.586466165413534, 0.0382718806515], [6.616541353383458, 0.0377782978146], [6.646616541353383, 0.037164729674], [6.676691729323308, 0.0364369173074], [6.706766917293233, 0.0356008387658], [6.7368421052631575, 0.0346626807522], [6.7669172932330826, 0.0336288103957], [6.796992481203008, 0.032505747219], [6.827067669172933, 0.0313001353933], [6.857142857142857, 0.0300187163717], [6.887218045112782, 0.028668301986], [6.917293233082707, 0.0272557480902], [6.947368421052632, 0.025787928828], [6.977443609022556, 0.0242717115974], [7.007518796992481, 0.0227139327813], [7.037593984962406, 0.0211213743072], [7.067669172932331, 0.019500741096], [7.097744360902255, 0.0178586394529], [7.12781954887218, 0.0162015564499], [7.157894736842105, 0.0145358403444], [7.18796992481203, 0.012867682072], [7.2180451127819545, 0.0112030978485], [7.2481203007518795, 0.00954791291], [7.2781954887218046, 0.00790774641495], [7.30827067669173, 0.0062879975279], [7.338345864661654, 0.00469383269953], [7.368421052631579, 0.00313017415259], [7.398496240601504, 0.00160168957926], [7.428571428571429, 0.000112783050624], [7.458646616541353, -0.00133241286514], [7.488721804511278, -0.00273004378373], [7.518796992481203, -0.00407653899649], [7.548872180451128, -0.00536861578873], [7.578947368421052, -0.00660328260393], [7.609022556390977, -0.00777784107676], [7.639097744360902, -0.00888988696125], [7.669172932330827, -0.00993730998333], [7.6992481203007515, -0.0109182926505], [7.7293233082706765, -0.0118313080532], [7.7593984962406015, -0.0126751166966], [7.7894736842105265, -0.0134487624011], [7.819548872180451, -0.0141515673159], [7.849624060150376, -0.014783126088], [7.879699248120301, -0.0153432992329], [7.909774436090226, -0.015832205755], [7.93984962406015, -0.0162502150647], [7.969924812030075, -0.0165979382438], [8.0, -0.0168762187076], [8.030075187969924, -0.0170861223164], [8.06015037593985, -0.0172289269874], [8.090225563909774, -0.0173061118583], [8.1203007518797, -0.0173193460556], [8.150375939849624, -0.0172704771183], [8.180451127819548, -0.0171615191288], [8.210526315789474, -0.0169946406026], [8.240601503759398, -0.0167721521857], [8.270676691729323, -0.0164964942109], [8.300751879699249, -0.0161702241599], [8.330827067669173, -0.0157960040805], [8.360902255639099, -0.0153765880024], [8.390977443609023, -0.0149148094], [8.421052631578947, -0.0144135687421], [8.451127819548873, -0.0138758211724], [8.481203007518797, -0.0133045643598], [8.511278195488721, -0.0127028265582], [8.541353383458647, -0.0120736549095], [8.571428571428571, -0.0114201040267], [8.601503759398497, -0.0107452248892], [8.631578947368421, -0.0100520540787], [8.661654135338345, -0.00934360338659], [8.691729323308271, -0.00862284981661], [8.721804511278195, -0.00789272600834], [8.75187969924812, -0.00715611110212], [8.781954887218046, -0.00641582206539], [8.81203007518797, -0.00567460549745], [8.842105263157896, -0.00493512992787], [8.87218045112782, -0.00419997862111], [8.902255639097744, -0.00347164289829], [8.93233082706767, -0.00275251598425], [8.962406015037594, -0.00204488738661], [8.992481203007518, -0.00135093781075], [9.022556390977444, -0.000672734613308], [9.052631578947368, -1.22277940578e-5], [9.082706766917294, 0.000628753475135], [9.112781954887218, 0.0012485037881], [9.142857142857142, 0.00184544391407], [9.172932330827068, 0.00241812268643], [9.203007518796992, 0.00296521837921], [9.233082706766917, 0.00348553958154], [9.263157894736842, 0.00397802558194], [9.293233082706767, 0.00444174627545], [9.323308270676693, 0.00487590160818], [9.353383458646617, 0.00527982057494], [9.38345864661654, 0.00565295978673], [9.413533834586467, 0.00599490162595], [9.443609022556391, 0.00630535200817], [9.473684210526315, 0.00658413777], [9.503759398496241, 0.0068312037035], [9.533834586466165, 0.00704660925824], [9.563909774436091, 0.00723052493236], [9.593984962406015, 0.00738322837509], [9.62406015037594, 0.00750510022276], [9.654135338345865, 0.00759661969134], [9.68421052631579, 0.00765835994827], [9.714285714285714, 0.00769098328662], [9.74436090225564, 0.00769523612474], [9.774436090225564, 0.00767194385422], [9.80451127819549, 0.00762200555914], [9.834586466165414, 0.00754638862926], [9.864661654135338, 0.00744612328926], [9.894736842105264, 0.0073222970664], [9.924812030075188, 0.00717604921768], [9.954887218045112, 0.007008565138], [9.984962406015038, 0.00682107076943], [10.015037593984962, 0.00661482703174], [10.045112781954888, 0.00639112429331], [10.075187969924812, 0.00615127690083], [10.105263157894736, 0.00589661778577], [10.135338345864662, 0.0056284931643], [10.165413533834586, 0.005348257347], [10.19548872180451, 0.00505726767343], [10.225563909774436, 0.00475687958605], [10.25563909774436, 0.00444844185677], [10.285714285714286, 0.00413329197876], [10.31578947368421, 0.00381275173495], [10.345864661654135, 0.00348812295382], [10.37593984962406, 0.00316068346197], [10.406015037593985, 0.00283168324221], [10.436090225563909, 0.00250234080465], [10.466165413533835, 0.00217383977745], [10.496240601503759, 0.00184732572285], [10.526315789473685, 0.00152390318318], [10.556390977443609, 0.00120463296057], [10.586466165413533, 0.000890529633076], [10.61654135338346, 0.000582559309098], [10.646616541353383, 0.000281637621059], [10.676691729323307, -1.13720416435e-5], [10.706766917293233, -0.000295660061175], [10.736842105263158, -0.000570471882924], [10.766917293233083, -0.000835109072696], [10.796992481203008, -0.00108893014261], [10.827067669172932, -0.00133135114966], [10.857142857142858, -0.00156184607141], [10.887218045112782, -0.00177994696432], [10.917293233082706, -0.00198524391029], [10.947368421052632, -0.00217738475815], [10.977443609022556, -0.00235607466692], [11.007518796992482, -0.00252107545841], [11.037593984962406, -0.00267220478711], [11.06766917293233, -0.00280933513573], [11.097744360902256, -0.00293239264513], [11.12781954887218, -0.00304135578777], [11.157894736842104, -0.00313625389393], [11.18796992481203, -0.00321716554042], [11.218045112781954, -0.00328421681158], [11.24812030075188, -0.00333757944246], [11.278195488721805, -0.00337746885444], [11.308270676691729, -0.00340414209328], [11.338345864661655, -0.00341789568008], [11.368421052631579, -0.00341906338514], [11.398496240601503, -0.00340801393508], [11.428571428571429, -0.00338514866343], [11.458646616541353, -0.00335089911447], [11.488721804511279, -0.0033057246106], [11.518796992481203, -0.00325010979267], [11.548872180451127, -0.00318456214303], [11.578947368421053, -0.0031096095006], [11.609022556390977, -0.00302579757696], [11.639097744360901, -0.00293368748242], [11.669172932330827, -0.00283385327047], [11.699248120300751, -0.00272687950889], [11.729323308270677, -0.00261335888533], [11.759398496240602, -0.00249388985497], [11.789473684210526, -0.00236907433718], [11.819548872180452, -0.00223951546827], [11.849624060150376, -0.00210581541632], [11.8796992481203, -0.00196857326427], [11.909774436090226, -0.00182838296674], [11.93984962406015, -0.00168583138562], [11.969924812030076, -0.00154149640914], [12.0, -0.00139594515866]], "smooth" => true, "symbol" => "none", "markLine" => Dict{String, Any}("data" => Any[Dict{String, Any}("yAxis" => 0, "lineStyle" => Dict{String, Any}("color" => "#888", "type" => "dashed"))], "symbol" => "none", "silent" => true), "type" => "line")], "backgroundColor" => "transparent"))

Exercise 3.1 — the transfer function. From $(ms^2+bs+k)X(s)=F(s)$, write the transfer function $H(s)=X(s)/F(s)$ as an expression in s, m, b, k.

# Transfer function H(s) = X(s)/F(s). Type it in the field, in terms of s, m, b, k:
H = giac""
missing
check(:transfer_fn, H)
Section 3 · Second-order systems — oscillation
check
✗ 3.1 · Transfer function of the oscillator — keep going
✗ $H(s)$: not answered yet
type your answer into the math field above
💡 Hint: For $m\ddot x+b\dot x+kx=F(t)$ at rest, transforming gives $(ms^2+bs+k)X(s)=F(s)$. The transfer function is $H(s)=X(s)/F(s)$.

Exercise 3.2 — natural frequency. Write omega_n(k, m) returning the undamped natural frequency $\omega_n=\sqrt{k/m}$.

function omega_n(k, m)
    missing
end
omega_n (generic function with 1 method)
check(:nat_freq, omega_n)
Section 3 · Second-order systems — oscillation
check
✗ 3.2 · Natural frequency (numeric) — keep going
✗ $\omega_n=\sqrt{k/m}$ — case 1: not implemented yet
replace the `missing` with your code
✗ $\omega_n=\sqrt{k/m}$ — case 2: not implemented yet
replace the `missing` with your code
✗ $\omega_n=\sqrt{k/m}$ — case 3: not implemented yet
replace the `missing` with your code
💡 Hint: Write `omega_n(k, m)` for the undamped natural frequency $\omega_n=\sqrt{k/m}$.

Exercise 3.3 — damping ratio. Write zeta(b, k, m) returning the damping ratio $\zeta=\dfrac{b}{2\sqrt{km}}$.

function zeta(b, k, m)
    missing
end
zeta (generic function with 1 method)
check(:damping_ratio, zeta)
Section 3 · Second-order systems — oscillation
check
✗ 3.3 · Damping ratio (numeric) — keep going
✗ $\zeta=b/(2\sqrt{km})$ — case 1: not implemented yet
replace the `missing` with your code
✗ $\zeta=b/(2\sqrt{km})$ — case 2: not implemented yet
replace the `missing` with your code
✗ $\zeta=b/(2\sqrt{km})$ — case 3: not implemented yet
replace the `missing` with your code
💡 Hint: Write `zeta(b, k, m)` for the damping ratio $\zeta=\dfrac{b}{2\sqrt{km}}$.

Exercise 3.4 — name the regime. The damping ratio decides everything. Write classify(z) returning the string "underdamped", "critically damped", or "overdamped" depending on whether $\zeta$ is below, equal to, or above $1$.

function classify(z)
    missing
end
classify (generic function with 1 method)
check(:classify, classify)
Section 3 · Second-order systems — oscillation
check
✗ 3.4 · Classify the response — keep going
✗ regime from ζ — case 1: not implemented yet
compare ζ to 1
✗ regime from ζ — case 2: not implemented yet
compare ζ to 1
✗ regime from ζ — case 3: not implemented yet
compare ζ to 1
💡 Hint: Write `classify(z)` returning `"underdamped"`, `"critically damped"`, or `"overdamped"` from the damping ratio $\zeta$ (boundaries at $\zeta=1$).

Your progress

This card tallies every exercise in the lesson and refreshes the moment you change any answer above. Fill the bar to complete the course.

course_report(;
    lap_exp        = L_exp,
    lap_sin        = L_sin,
    inv_lap        = f_cos,
    decay_transform = N_s,
    decay_solution  = N_t,
    half_life       = half_life,
    transfer_fn     = H,
    nat_freq        = omega_n,
    damping_ratio   = zeta,
    classify        = classify,
)
📊 Course progress
0 / 10 exercises · 0%
Section 1 · Meeting the transform — 0/3
Section 2 · First-order systems — decay — 0/3
Section 3 · Second-order systems — oscillation — 0/4