I am trying to solve ordinary differential equations with initial conditions using Laplace transform. A simple test setup includes
an exponential discharge of RC circuit and
an integrator from coil and voltage source.
While the result of the first example is as expected, the second one is not. What am I missing?
function ilap_test syms s RC vc vc0 il il0 L vin % vc_dot = -1/RC * vc exponential discharge % il_dot = 1/L * vin current integrator % s*vc - vc0 = -1/RC * vc % transform with initial conditions % s*il - il0 = 1/L * vin vc = vc0/(s + 1/RC); il = vin/L/s + il0/s; simplify(ilaplace(vc)) % vc0*exp(-t/RC) (ok) simplify(ilaplace(il)) % il0 + vin/L shouldn't this be il0 + vin/L*t ???