Introduction to the Differential Equations Special Series
A casual dive into first- and second-order linear differential equations, kicking things off with the integrating factor method — because this stuff shows up *everywhere* in nature!!

OK so today I wanna do a post about “(linear) differential equations” — the thing every STEM undergrad in college runs into an absurd number of times.
(Why, you ask??? Because I forgot it all lol. Let’s go — I’ll study while I write.)
Before we dive in — back in middle and high school, you spent a lot of time solving systems of equations, right? What did “solving an equation” mean back then? It meant: find the $x, y$ that make the equation true. Yeah?
Then what is a differential equation?????
I think you can put it really simply: it’s finding the function that makes the equation true.
So the goal of this post is — among linear differential equations, the one that shows up an insane amount in nature!! The simplest form of it, the “second-order linear differential equation”:

The goal is to crush and solve differential equations of this shape!! ($y$ and $f(x)$ are functions of $x$, the coefficients are constants, and $a_2\ne0$. When we divide by $a_2$, we divide the right-hand side by it too.) It’s a tiny tiny slice of the giant zoo of differential equations, but apparently it’s important because this exact form shows up everywhere in nature?!?!
<I’m studying out of Boas’s mathematical physics book, so the mathematical rigor might be… lacking ;; sorry. This is more of a methods-style discussion.. so ;;>
Now that we know where we’re going, let’s walk there step by step, starting with the easy stuff.
The first-order linear DE and the integrating factor
We’ll do the first-order linear differential equation before the second-order one.
![]()
When we run into a 1st-order linear DE that looks like this!! ($P, Q$ are both functions of $x$.) How do we crush and solve this?!?!
Let’s smash it with the integrating factor method!! First,
— we’ll grab a clue by finding the solution to this simpler thing.

![]()
I just lumped some constant together and called it $A$. Kinda feels like I’m just integrating mindlessly, like an integration machine —
— and we’ve gotten this far.
Now what is this thing??
The original equation was
. If we apply what we just found to the left-hand side of this,


Boom — we found the function of $x$ that makes the LHS equal the RHS!! That $y$ is

But wait — the solution we actually want: we need $y$ that satisfies
,,,,, ;_; what the heck what the heck!! T_T
OK let’s try multiplying both sides by the integrating factor $e^I$!?!?!


So,

And now,
![]()
Even when a junk-looking equation like that stares us in the face, we are not even slightly scared anymore!!
The second-order linear DE, right-hand side 0
OK, onward.
Our destination is the second-order linear DE — so why did we bother with the first-order one…………
The reason is: handling the 2nd-order one, we get to recycle the stuff above wholesale heh heh heh

Our goal!! Let’s write it down one more time?!?
Ah, one thing to notice — in the first-order DE we just did, the coefficients were functions of $x$. In the second-order DE, the coefficients are constants.
It’s not that you can’t solve it when the coefficients aren’t constants — apparently there’s a whole bag of case-by-case techniques. Variation of parameters or power-series methods, that kind of thing???? Anyway, the variable-coefficient case — we’re setting that aside.

To work toward solving this, just like with the 1st-order, let’s start with the case where the right-hand side is 0 ^^



Let’s drag in the quadratic formula, the same way we factored stuff back in middle school.

Ugh… what do I name the subscript ;_; I’ll just take the G from GD park…..

$D$ is an operator, so the way you have to read this is~~~

Let’s try the first one.


Making this jump — y’all aren’t, like, shocked or anything right?!?~~~!?! In case you’re like “bro he’s just integrating mindlessly like an integration machine again,,,” let me walk through it one more time.
The $y_1$ and $y_2$ that just appeared — what are they?

They were $y$’s that satisfy this equation. And two of them popped out!! So if you plug $y_1$ into that equation, the equation holds —

and if you plug in $y_2$, the equation also holds.

Now here’s where you start to feel what “linear” actually means:
Because it’s linear, the linear combination of those two solutions is also a solution!!
Why do we keep saying linear linear linear linear /// I’m gonna throw up from all this linear linear — the reason it’s called linear is, <for more detail, look forward to my “Linear Algebra I Studied” series in the summer of 2015 ♡> → it’s out: Prologue: Heralding the Beginning (Linear Algebra I Studied #1)

because even if you plug $(y_1 + y_2)$ in for $y$ here, .,,,,,, it’s still a solution!
Huh???? Wanna try plugging it in?!

(Lightbulb on!!) Ahhh I see~~ so ‘$y_1 + y_2$’ is also a solution?!?!
Rather than saying “the solution is $y_1$” or “the solution is $y_2$,” when we wanna talk in the most general terms, we lump them together and say “the solution is $y_1 + y_2$.” That’s the more comprehensive way to put it ~~~~~~ oh ho ho ho hong
So this solution is, apparently, called the General Solution ^^^ NOW do you see why it’s nauseating to keep saying linear linear linear like a broken record?!?!
So the general solution of what we just did above is~~

There’s one more thing to think about..!! Which is —

Earlier I just kinda casually assumed the inside of the square root is positive ~~ and waltzed on past ;_; We also have to think about when it’s not positive.. It’ll be simple, right??

So the general solution $y_1 + y_2$ is

Shall we think about one more case? By now I bet you can guess what case~~ What if the inside of the square root is exactly 0?!?!
![]()
Easy.


OK, summarizing in one sentence one more time!! Solving a linear 2nd-order equation with constant coefficients and zero on the right-hand side — introduce the operator $D$ and do the (equivalent of) factoring,

Boom — we can now solve the RHS-equals-0 case of linear 2nd-order DEs ~~~~~~~~~
A nonzero right-hand side: the particular solution
We’re almost at the goal!! Finally,

We’re gonna find the $y$ that satisfies this. A few things to lay down first. T_T
Honestly, you can’t do this easily for just any $f(x)$… ;_; It’s a pretty limited case — but what if that limited situation happens to show up a lot in nature? Then its significance isn’t small at all, right~?~? I think it’ll be useful!!
So let’s go. When $f(x)$ is related to an exponential, we can find it suuuuper easily ~~!! So we’ll put $f(x) = k e^{cx}$ on the right-hand side, ta-da-da-da-da~ Then introduce operator $D$, same principle as before — we’ll start the discussion from here:

We already covered how to find $y_c$ earlier, so let’s go on a quest to find $y_p$. Go go go go go go go~!!
How does one find the particular solution?~?~?~?


Lemme think about this juuust a tiny bit more simply~!! Brute forcing? Nope nope nope nope!!


Here again we have to split into cases………………… ;; This post is getting way too long, so I’ll show just one more case and then wrap it up?? That cool!?~ It’s already plenty long and I’m scared it’s gonna get longer ;; Sob sob, sorry for blowing this up like this over content that’s not even that big a deal T_T


If you brute force through all of them you can pin down the form of $y_p$ for each case!!!!! Fun, right?!?!

Rather than calling it a proof — since we showed that the form of $y_p$ comes out like that, from here on we just say “the form of $y_p$ is that!!" then determine the constant $C$, and we walk our way to the general solution!!
One more thing to add,

Same resonance warning as before: if $i\alpha$ is a characteristic root, multiply the guess by $x$ (or $x^2$ for a double root) before solving for its coefficient. Otherwise its denominator would be zero!
And that’s the method of solving 2nd-order linear differential equations, up to here. I’ll upload worked-out practice problems when I’m bored.
The spring problem — extremely important in physics — and stuff like the RLC circuit in circuit theory — it’s so satisfying when you can swoosh~ through and crush them with the 2nd-order DE method above ?~?~?~
Everybody, be happy ~
Heads-up. The figures here are the original notes, slips and all. A few things to watch for:
- In the first-order separation, use $\ln|y|$ on an interval where $y\ne0$; the final arbitrary $A$ includes negative values and $A=0$. In operator notation, $Dy=y'$ is a function, whereas $yD$ is an operator acting on whatever follows; they cannot be swapped.
- In the complex-root case, $c_G$ is defined by $c_0^2 - c_1^2 = c_G^2$ (the note keeps the earlier $c_1^2 - c_0^2$), so that $D = -c_1 \pm ic_G$. And in case iii) of the summary, the factor is $e^{\alpha x}$, not $e^{ax}$: $y = e^{\alpha x}(A\cos\beta x + B\sin\beta x)$.
- In the brute-force solution of $(D - a)(D - b)y = ke^{cx}$, the second term carries the constant $C$ from $u$: $\frac{C}{a - b}e^{(a-b)x}$, not $\frac{c}{a - b}$.
- In the case $c = a$, the integrating factor comes from $I = \int -b\,dx = -bx$ (not $\int -bx\,dx$), the parts integral is $\int kx\,e^{(c-b)x}dx = \frac{kx}{c - b}e^{(c-b)x} - \int \frac{k}{c - b}e^{(c-b)x}dx$, and the line after it is $\frac{kx}{c - b}e^{cx} - \frac{k}{(c - b)^2}e^{cx} + \frac{A}{c - b}e^{cx} + Be^{bx}$; the form $Kxe^{cx} + A'e^{cx} + B'e^{bx}$ is right. In the summary table, the conditions are on the exponent $c$ (lowercase), not on a constant $C$.
Comments
Discussion happens via GitHub Discussions. You'll need a GitHub account to comment.