Inhomogeneous Airy equation $y” + t y = \cos(t) $

airy-functionsordinary differential equations

So, given the initial equation as $y'' + t y = \cos(t) $, I've got no clue as to how to handle this one.

I did some research into it, $y'' + xy =0 $ is an Airy equation that can be perfectly solved by different methods, i.e. series, Airy functions etc. Still, when it comes to an inhomogeneous guy, I am baffled.
What do I do?
I tried to utilize a series approach, but got stuck with the cosine $ t^{2n}$ part of the series
$$
2a_2 -1 +\sum_{n=1}^{\infty} t^n \left( \left(n+2\right)\left(n+1\right)a_{n+2}+a_{n-1} – \frac{\left(-1\right)^n t^n} {(2n)!}\right) = 0
$$

So it's of no use to me here.

Best Answer

Where did your last expression come from? When searching for a series solution you are supposed to explicitly write power series on both sides and carefully match coefficients.

Let's assume, for small $t$, the function can be written as:

$$y(t)=a_0+a_1t+a_2 t^2+ \cdots$$

Now we substitute this into the equation.

Up to first order we have: $$2a_2+6 a_3 t+a_0 t=1$$ Up to second order: $$2a_2+6 a_3 t+12 a_4 t^2+a_0 t+a_1 t^2=1-\frac{1}{2} t^2$$ and so on. Now we match the coefficients for the same powers of $t$. We can see here that: $$2a_2=1 \\ 6a_3+a_0=0 \\ 12 a_4+a_1=-\frac{1}{2}$$

If there's a general pattern, we can try to derive it. It's not always clear from the start, which is why I prefer writing down the first few terms explicitly.

In any case, I don't see what kind of trouble you had with your general expression? Yes, series for $\cos$ have only even powers. That just makes the equations easier to solve.

Note that we can write the cosine series as:

$$\cos t=\sum_{n=0}^\infty \frac{(-1)^n t^{2n}}{(2n)!}=\sum_{n=0}^\infty \frac{c_n t^n}{n!}$$

Where $c_{2k}=(-1)^k$ and $c_{2k+1}=0$, for $n=2k$ or $n=2k+1$.

Can you match the coefficients for your equation now?


Update

Another way would be to use the standard methods of solving inhomogeneous linear ODEs.

We search for a particular solution $y_p$, and write the general solution as a sum of the general solution of homogeneous equation $y_h$ and $y_p$.

$$y(t)=y_h(t)+y_p(t)$$

$$y_h(t)=C_1 \text{Ai} (-t)+C_2 \text{Bi} (-t)$$

Searching for $y_p$ might be done in various ways, for example, search in the form:

$$y_p(t)=C(t) \text{Ai} (-t)$$

Then:

$$C''\text{Ai} (-t) -2 C' \text{Ai}' (-t)= \cos t$$

Set:

$$C'(t)=f(t)$$

$$\text{Ai} (-t) f'-2 \text{Ai}' (-t) f= \cos t$$

This is a first order linear equation and can be solved in the usual way.

Of course, this method leads to some very awkward integrals, but it gives exact general solution in a manner of speaking.

Related Question