Suppose we have an unknown profit function:

 y(x)\ \text{such that}\ x=\text{Initial amount invested.}

Now suppose someone hands you a differential equation that this profit function has to satisfy:

y''-3y'+2y=0

This is a second-order homogeneous differential equation, and we can solve it by inspection!

If you're unfamiliar with the notation, the primes simply represent derivatives:

\frac{d}{dx}(\frac{d}{dx}(y))-3\frac{d}{dx}(y)+2y=0

Finding a Test Function

By inspection, we want a function whose derivatives are constant multiples of the function itself.

Why?

Because when we substitute the function and its derivatives into the left-hand side, we want everything to cancel out and give us the right-hand side of 0.

We don't know what that constant will be yet, so let's call it “r“.

One function we can think of is:

y_{Test}(x)=e^{rx}\ \text{such that}\ r\ \text{is some scalar.}

A more intuitive way to understand why we choose this test function is to start with what we want:

y'=ry

In other words, we want a function whose derivative is just some constant “r“ multiplied by the original function.

Let's solve this equation and see where the test function comes from:

\begin{aligned}&y'=ry\\ \implies &\frac{d}{dx}(y)=ry\\ \implies &dy=rydx\\ \implies &\frac{1}{y}dy=rdx\\ \implies &\int \frac{1}{y}dy=\int rdx\\ \implies &\ln(|y|)=rx+C_1\\ \implies &|y|=e^{rx+C_1}=e^{rx}\cdot e^{C_1}\\ \implies &\text{But the function}\ e^x\ \text{is always positive!}\\ \implies &y=e^{rx}\cdot C_2 \end{aligned}

So the test function is exactly the type of function we're looking for:
Its derivative is a constant multiple of itself.

For our test function, we can simply choose the constant to be 1:

C_2=1\implies y_{Test}(x)=e^{rx}

Finding “r“

Now let's see what happens when we substitute our test function into the original differential equation:

\begin{aligned}&\frac{d}{dx}(\frac{d}{dx}(e^{rx}))-3\frac{d}{dx}(e^{rx})+2e^{rx}=0\\ \implies &\frac{d}{dx}(re^{rx})-3re^{rx}+2e^{rx}=0\\ \implies &r^2e^{rx}-3re^{rx}+2e^{rx}=0\\ \implies &e^{rx}(r^2-3r+2)=0\\ \implies &\text{But}\ e^{rx}\ \text{can never be 0.}\\ \implies &r^2-3r+2=0\\ \implies &(r-2)(r-1)=0\\ \implies &r=2\ \text{or}\ r=1\\ \end{aligned}

Great! We have found two solutions:

y_1(x)=e^{2x},\ y_2(x)=e^{x}

Applying Superposition

Next, we apply the Principle of Superposition:
“If two functions are solutions to a linear, homogeneous differential equation, then any linear combination of those functions is also a solution.“

In other words, we can scale each solution by a constant and add them together.

Being careful to use separate constants for the two independent solutions, we get:

\boxed{y(x)=C_3e^{2x}+C_4e^x}

Since there was no initial condition given, this is the general solution for our profit function.

And that's it! We started with an unknown function, found two fundamental solutions, and used superposition to construct the entire family of solutions.

Next week, we'll tackle a different differential equation. This time with an initial condition!💵📈💪