# Thread: What am I doing wrong, differential equation

1. ## What am I doing wrong, differential equation

We're looking for $x(t)$. The data are : $x'=f(t,x)$, $x(0)=0$.
We have $f(t,x)=1+x^2$.
I rewrite it as $\frac{dx}{dt}=1+x^2$. Which is equivalent to $1=\frac{dx}{(1+x^2)dt}$. Equivalent to $\int dt=\int \frac{dx}{1+x^2}$. Which means that $t=arctan(x)$. As we were looking for $x(t)$, from what we got it's easy to see that $x(t)=tan(t)$. $x(0)=0$ is satisfied.
Now looking at the beginning, we had that $x'(t)=1+x^2$. What I'm missing to understand is how my solution works here? If I derivate $tan(t)$ I won't get the $1+x^2$. I'm confused.

2. Originally Posted by arbolis
We're looking for $x(t)$. The data are : $x'=f(t,x)$, $x(0)=0$.
We have $f(t,x)=1+x^2$.
I rewrite it as $\frac{dx}{dt}=1+x^2$. Which is equivalent to $1=\frac{dx}{(1+x^2)dt}$. Equivalent to $\int dt=\int \frac{dx}{1+x^2}$. Which means that $t=arctan(x)$. As we were looking for $x(t)$, from what we got it's easy to see that $x(t)=tan(t)$. $x(0)=0$ is satisfied.
Now looking at the beginning, we had that $x'(t)=1+x^2$. What I'm missing to understand is how my solution works here? If I derivate $tan(t)$ I won't get the $1+x^2$. I'm confused.
$t = \arctan(x) + C$. Impose the boundary condition: C = 0.

So $t = \arctan(x) \Rightarrow x = \tan (t)$. So all is well.

$\frac{dx}{dt} = \sec^2 t = 1 + \tan^2 t = 1 + x^2$. So there's no problem - things work just fine.

3. . So there's no problem - things work just fine.
That may looks innocent but now I understand what I wasn't understanding! Great.