How do I differentiate $y(t)=-[t]+\frac{1}{2}\cdot(1-3^{t-[t]})$, $t \ge 0$, ($[x]$ is the integer part of $x$) in order to verify that it is the solution of the ODE y' = \log(3) \cdot (y-[y]-\frac{3}{2}), $y(0)=0$?
How do I differentiate this function?
2 Answers
The same way you differentiate any other expression.
$\begin{align} \frac{dy(t)}{dt} &= -\frac{d[t]}{dt} + \frac12\frac{d}{dt}\left(1 - 3^{t-[t]}\right) \\ &= -\frac{d[t]}{dt} + \frac12 \left(0 - 3^{t-[t]} \log 3 \cdot \frac{d}{dt}(t-[t])\right) \\ &= -\frac{d[t]}{dt} - \frac12 3^{t-[t]}\log 3\cdot\left(1 - \frac{d[t]}{dt}\right). \end{align}$
When $t$ is an integer, $[t]$ has a discontinuity and its derivative is undefined. So, for the differentiation to make sense, we can only consider the case when $t$ is not an integer. Then, $[t]$ is locally constant, so $d[t]/dt = 0$, and we have $\begin{align} \frac{dy(t)}{dt} &= -0 - \frac12 3^{t-[t]}\log 3\cdot\left(1 - 0\right) \\ &= -\frac123^{t-[t]}\log 3. \end{align}$
Edit: Okay, let's see if we can plug this into the ODE and verify the solution. We have $y(t) = -[t] + \frac12\left(1 - 3^{t-[t]}\right),$ and we want to know what $\log3\cdot\left(y - [y] - \frac32\right)$ is, so we should figure out something about $y - [y]$. Knowing that $t - [t]$ lies between $0$ and $1$, it is straightforward to find that $\frac12\left(1 - 3^{t-[t]}\right)$ lies between $-1$ and $0$. So $y(t)$ is a little lower than $-[t]$, but not so low that it passes $-[t]-1$. Since $-[t]$ is an integer, that tells you exactly what $[y(t)]$ is. Plug that in and I expect you should arrive at the solution pretty quickly.
-
0@yuanwei, please see my edit. – 2012-01-26
Let's denote $[t]$ as : $[t]=trunc(t)$
According to Maple solution exists only for real numbers that are not non-zero integers and it is given by following expression :
y'(t)=-trunc(1,t)-\frac{1}{2}\cdot 3^{t-trunc(t)}\cdot (1-trunc(1,t))\cdot \ln 3