# 3rd order differential equation with time-dependent coefficients

We are trying to solve a 3rd order differential equation of the following form:

$3y(t) + t\cdot y'(t) - 2s\left(3y''(t)+t\cdot y'''(t)\right) = 0$, where $s > 0$ is a parameter.

The terminal conditions are:

$y(\overline{t}) = 1$, $y'(\overline{t})=0$, $y''(\overline{t}) = \frac{-1+3\overline{t}-3\overline{t}^2-2s}{2s \overline{t}(1-2\overline{t})}$,

and we are interested in the behavior of $y(t)$ before $\overline{t}$ (which can be treated as parameter).

This problem arose from a practical context (a specific economic model), but unfortunately we are not familiar with solving differential equations of this kind. Any help would be appreciated!

Note that $y_1 = e^{-t/\sqrt{2s}}$ (also $e^{t/\sqrt{2s}}$) is a solution to the ODE

$$3 y + ty'-2s \,(3y''+t y''') = 0$$

You can now use, given the ODE is linear, variation of parameters to seek solutions of the form

$$y(t) = A(t) y_1(t)$$

Introduce this ansatz into the original equation and solve for $A$. Then, impose the final conditions to find the corresponding integration constants.

Can you take it from here?

Let me elaborate on how I got to $y_1$.

If we assume a solution of the form $e^{\alpha t}$, we get:

$$3 + t \alpha - 2 s \, (3 \alpha^2 + t \alpha^3) = 0$$

The fact that $t$ appears in the polynomial tells us, in general, that the solution cannot be sought in this form. Nevertheless, we are lucky and we can factor the equation above to (thanks Mathematica!):

$$(3 + t \alpha)(1-2s\alpha^2) = 0,$$

which is true iff $\alpha =\pm 1/\sqrt{2s}$. Thus, we have just found two (of the three) independent solutions to the ODE. Obtaining the third can be achieved by using variation of parameters, as commented above.

The output from Mathematica for the most general solution of your ODE is:

$$y = c_1 y_1 + c_2 y_2 + c_3 y_3,$$

where $y_{1,2} = e^{\pm t/\sqrt{2s}}$ and $y_3$ involves the exponential integral defined by

$$\operatorname{Ei}(x)=-\int_{-x}^{\infty}\frac{e^{-t}}t \, \mathrm{d}t$$

You now may apply the terminal conditions as follows

\begin{align*} y(t_f) = 1 & \implies 1 = c_1 y_1(t_f) + c_2 y_2(t_f) + c_3 y_3(t_f) \\ y'(t_f)= 0 & \implies 0 = c_1 y'_1(t_f) + c_2 y'_2(t_f) + c_3 y'_3(t_f) \\ y''(t_f) = f(t_f,s) & \implies f(t_f,s) = c_1 y''_1(t_f) + c_2 y''_2(t_f) + c_3 y''_3(t_f), \end{align*} which yields a linear system of equations for $c_i$. This system can be solved by using, for instance, Cramer's rule. I don't think it's worth trying to solve this by hand, for practical purposes.

If we ask Mathematica for the complete solution of the problem, including the terminal conditions, we will obtain some long and intractable expression for $y(t)$, which is a function of $t$, $s$ and $t_f$. Once you have determined $y$, you can look for values of $s$ and $t_f$ that make sure that $y(\underline{t}) = 0$, for given $\underline{t}$.

Q: Have you thought about solving this problem numerically?

• First of all, many thanks for your input - this should help us tremendously. However, due to my lack of experience with differential equations, I still struggle how to proceed from there. If I use $y(t) = A(t)y_1(t)$, the problem seems to reduce to a second order differential equation. Mathematica gives: $e^{-\frac{t}{\sqrt{2} \sqrt{s}}} \left(-2 s t A^{(3)}(t)+\left(3 \sqrt{2} \sqrt{s} t-6 s\right) A''(t)+\left(6 \sqrt{2} \sqrt{s}-2 t\right) A'(t)\right) = 0$ after doing the calculation. Is there a similar trick to simplify the equation even further? Commented May 3, 2017 at 23:03
• Hi @Martin. Indeed, you can find $A(t) = c_1$ as a solution of the new 3rd order ODE for $A$. You can then reduce the order by making $B(t) := A'(t)$ and solving the corresponding 2nd order for $B$ (you may use variation of parameters again) but I'm afraid your solution cannot be expressed in terms of elementary functions but rather as some definite integral. If you solve the equation for $B$ or the original, you'll find that the third part of the homogeneous solution involves the so-called exponential integral functions. If you are happy with Mathematica's answer, go and take it! Commented May 4, 2017 at 1:29
• Thanks again for your response. We have now tried to reduce the differential even further by using $B(t) = A'(t)$ and examining the new second order differential in the comment above, but we were not able to reduce it to first order. Do you know whether that would be possible still without involving the exponential integral function? Unfortunately, we are not completely happy with the solution by Mathematica, since we are trying to determine a value $\underline{t}$ such that, given the parameters $\overline{t}$ and $s$, it holds that $y(\underline{t}) = 0$. Commented May 4, 2017 at 9:34
• Or another way to rephrase / help us understand: How could we make use of both independent solutions $y_1 = \exp^{-t/\sqrt{2s}}$ and $y_2 = \exp^{t/\sqrt{2s}}$ simultaneously (such that only one remains)? Commented May 4, 2017 at 9:44
• @Martin, I'll edit my comment to illustrate how to impose your given conditions, but I'm afraid you have to use the ugly looking exponential integrals no matter what. Commented May 4, 2017 at 17:02