First Order ODEs


First Order ODEs

Anna
Alright Michael, let's talk about first-order linear differential equations. The classic one is dy/dt = a y + q(t). That constant a is like an interest rate, and q(t) is a source term—deposits or withdrawals.

Michael
Right, and the key is that because it's linear, the general solution breaks into two parts: the null solution from dy/dt = a y, and a particular solution that handles the source. Then we just add them together.

Anna
Exactly. The null solutions are easy: y_n = C e^(a t). So if the source is a constant, say q(t)=1, we look for a constant particular solution. Plugging in gives y_p = -1/a. Then the full solution is y = C e^(a t) - 1/a, and we find C from the initial condition.

Michael
What about when the source is an exponential, like e^(s t)? That's the most important case because exponentials are the building blocks. We guess y_p = Y e^(s t), plug it in, and solve for Y. We get Y = 1/(s - a), which is called the transfer function.

Anna
And if s equals a, we get resonance—division by zero. That's a special case. But for now, note that the response is huge when s is close to a. Next, step functions: q(t) = H(t - T), which is 0 before T and 1 after. Before T, it's just the null solution. After T, it's like the constant source case but shifted: y = y(0) e^(a t) + (1/a)(e^(a(t-T)) - 1).

Michael
That makes sense—the deposit starts growing only after T. Now, the delta function is even more fun. It's an instantaneous impulse, like a bat hitting a ball. Its integral is 1, and when you have dy/dt = a y + δ(t-T), the solution jumps by 1 at time T. So for t > T, we add e^(a(t-T)) to the null solution.

Anna
And the delta function has that neat property: ∫ f(t) δ(t) dt = f(0). So it picks out the value at the spike. That's incredibly useful for modeling impulses. Now, putting it all together, the general solution for any q(t) is y(t) = y(0) e^(a t) + ∫_0^t e^(a(t-s)) q(s) ds. That integral just adds up all the deposits, each growing for the remaining time.

Michael
I love that formula—it's so intuitive. Finally, we tackled cosine sources. Because cosine isn't an exponential alone, we need both cosine and sine terms. Guessing y = M cos t + N sin t and matching coefficients gives M = -a/(1+a^2), N = 1/(1+a^2). Complex exponentials make it cleaner, but that's for next time.

Anna
Right. So we've covered constant, exponential, step, delta, and cosine sources—plus the general integral formula. That's a solid foundation for solving first-order linear ODEs with constant coefficients.

Ask anything
We've read this whole study set, so questions about it get the best answers.