Say, following on from that thing about Laplace transforms, it reminded me that I typically wave my hands at the ODE characteristic equation trick.

You know the one. You have something like 2y+5y+3y=0 and you magically turn it into 2λ2+5λ+3=0, factorise it as (2λ+3)(λ+1)=0 and deduce that your complementary function is y=Ae3x/2+Bex. I’ll stop waving now.

However, I will throw some initial conditions at it: let’s say that when x=0, y=0 and y=1.

That means A+B=0 and 32AB=1. That leads to A=2 and B=2.

Usually I justify the handwaves either in an Ansatzy sort of way (“let’s assume solutions of the form…”) or via something like “we can write it as 2y+2y+3y+3y=0, so let z=y+y” and it all integrates out nicely. Both of those are fine. But the Laplace transform rang a bell and I started salivating.

The Laplace transform of 2y+5y+3y=0 is 2s2Y(s)+5sY(s)+3Y(s)(2s+5)y(0)2y(0)=0.

I’m going to throw the initial conditions in here, and tidy up because it’s getting messy:

$Y(s)(2s^2 + 5s + 3) = 2

Rearranging gives Y(s)=2(2s+3)(s+1).

This partial-fractions nicely as Y(s)=2s+142s+3.

In turn, this inverts to 2ex2e3x/2, just as before. There’s no simultaneous equation to solve, but there is a partial fraction, so it’s swings and roundabouts – but this method should also be able to handle a non-zero right-hand-side without needing to come up with a template solution. I like it!