# Solving ODE and finding maxima

Consider the initial value problem $y' + 5y = 5t, y(0) = y_0$. Find the value of $y_0$ for which the solution touches, but does not cross, the $t$-axis.

This is linear first order DE, so I found integrating factor=$e^{(2/3)t}$ Solving ODE I got, $y=\frac{21}{8}-\frac{3}{4}t+Ce^{(-2/3)t}$ Using, $y(0)=y_0$, we get $C=y_0-\frac{21}{8}$. Now, if we take first derivative of the solution function $y$ to find the point where it has zero slope, we end up with two unknown in the equation, $y_0$ and $t$. $y'=\frac{-3}{4}+\frac{-2}{3}(y_0-\frac{21}{8})e^{-(2/3)t}=0.$

-

First, your solution is incorrect. $$y'(t) + 5y(t) = 5t \implies \exp(5t) y'(t) +5y(t) \exp(5t) = 5t \exp(5t)\\ \implies \dfrac{d \left( y(t) \exp(5t)\right)}{dt} = 5t \exp(5t)$$ Hence, $$y(t) \exp(5t) = \left( t - \dfrac15 \right) \exp(5t) + c \implies y(t) = t - \dfrac15 + c \exp(-5t)$$ The slope is given by $$y'(t) = 5 (t-y(t)) = 5 \left(\dfrac15 - c \exp(-5t) \right) = 1 - 5c \exp(-5t)$$ For this to touch but not cross the $t$ axis, we need $y(t_0) = 0$ and $y'(t_0) = 0$. These give us $$t_0 - \dfrac15 + c \exp(-5t_0) = 0$$ and $$1 - 5c \exp(-5t_0) = 0$$ Now obtain $t_0$ and $c$ by solving these two equations. This gives us $t_0 = 0$ and $c = \dfrac15$. Hence, the curve is given by $$y(t) = t - \dfrac15 + \dfrac{\exp(-5t)}5.$$ Now $$y_0 = y(0) = 0$$

-
@Vikram: This is what you wanted. :) – Babak S. Jul 1 '12 at 7:01
Actually I was afraid to say that I made a mistake while posting the question, the question that I have posted and my partial answer are both different, I also don't know from where that wrong DE got pasted here, sorry friends. :( – Vikram Jul 1 '12 at 10:24

It is not necessary to solve the DE to answer this question.

Suppose that $y(t)$ is a solution to the DE that touches, but does not cross, the $t$-axis, and let $t_0$ denote the time at which this happens.

Since the solution $y$ touches the $t$-axis at the time $t_0$, we have $y(t_0) = 0$.

Since the solution $y$ does not cross the $t$-axis at this time, we must have $y'(t_0) = 0$. (If $y'(t_0)$ were positive, then there would be some $\delta > 0$ with the property that $y(t)$ is negative for all $t$ in $(t_0 - \delta, t_0)$ and positive for all $t$ in $(t_0, t_0 + \delta)$, and hence the solution $y$ crosses the $t$-axis instead of just touching touch it. The analysis is similar if $y'(t_0) < 0$.)

Since $y$ solves the DE, we have $$y'(t_0) + 5 y(t_0) = 5 t_0.$$ Using the facts established earlier that $y'(t_0) = y(t_0) = 0$, we deduce from the above equation that $0 = 5 t_0$, and hence that $t_0 = 0$. It follows that $$y(0) = y(t_0) = 0.$$ [To make the argument in "if $y'(t_0)$ were positive..." more rigorous, you need to observe that if $y$ solves the DE, then $y$ is differentiable, and hence continuous, and hence $y' = 5t - 5y$ is continuous. So the continuous function $y'$, being positive at $t_0$, must also be positive in a neighborhood of $t_0$. The claims about the sign of $y$ then follow from the mean value theorem.]

-

Your achieved solution is wrong! $$y'+5y=5t\rightarrow\mu(t)=\exp(\int5dt)=e^{5t}$$ $$\rightarrow d(e^{5t}y)=5te^{5t}\rightarrow y=t-\frac{1}{5}+Ce^{-5t}$$ if $y(0)=y_0$ $$y=25t-25+(y_0+\frac{1}{5})e^{-5t}$$ Now, take this latter one as you answer.

-
Nice correction! Thank goodness, for the OP's sake! +1 – amWhy Mar 8 '13 at 1:41