∫ A solution for ODE with an arbitrary term
Kernel:
- A derivation of a solution to ODE with an arbitary non-homogeneous term.
In this blog, I derive a solution to the following ODE:
This function captures the dynamics of a system where the rate of change of a variable \(f\) is determined by the difference between an arbitrary function \(q(t)\) and the current value of \(f\) scaled by a constant \(\lambda\). We can think of \(q(t)\) as the input added to the system that always decay.
To solve this ODE, we first multiply both sides by \(e^{\lambda t}\) and rearrange the terms:
One can verify that the solution is correct by programming the ODE and plotting the solution. Here the result is perfectly fitted to the solution of the ODE.
It's also worth noting that the solution is insentivity to the initial condition when \(t\) is large due to the exponential term \(e^{-\lambda t}\). Here I plot the solution with a different initial condition and the result converges to the same solution.
Very interesting.