NapkinCalc

Differential Equations

The harmonic oscillator — y″ = −ω²·y

continues from lesson 2 — values defined earlier in the course stay live here

When the second derivative is proportional to −y, the solution doesn't decay — it oscillates: springs, pendulums, quartz watches, vibrating beams. The natural frequency comes straight from the physics: ω₀ = √(k/m).

ks:=200N/mk_{s} := 200 N/m = 200 N / m spring stiffness
ms:=0.5kgm_{s} := 0.5 kg = 0.5 kg hanging mass
ω0=ksms\omega_{0} = \sqrt{\frac{k_{s}}{m_{s}}} = 20 Hz natural angular frequency (rad/s)
fosc=ω02πf_{osc} = \frac{\omega_{0}}{2 \cdot \pi} = 3.1831 Hz cycles per second

Add friction and the two behaviors combine: an exponential envelope strangling an oscillation. This curve is the heartbeat of every vibration problem in engineering:

exp(-0.4 * x) * cos(3 * x)
-0.500.510246810

damped oscillation — the exponential decay of Diff Eq 1 enveloping the cosine of the oscillator

You now hold the full Mathematics track: algebra to manipulate, calculus to differentiate and accumulate, matrices for systems, and differential equations to model anything that moves. This is the math engineering is written in.