# Math Help - Differential equation changing variable?

1. ## Differential equation changing variable?

I don't know this one:

$\frac{dy}{dt}=(y+t)^2$

Use substitution $z=y-t$ it says, but then $\frac{dy}{dt}=z^2$? Then what? Please

2. Originally Posted by TeaWithoutMussolini
I don't know this one:

$\frac{dy}{dt}=(y+t)^2$

Use substitution $z=y-t$ it says, but then $\frac{dy}{dt}=z^2$? Then what? Please
Not quite if

$z=y-t \implies \frac{d}{dt}z =\frac{d}{dt}(y-t) \iff \frac{dz}{dt}=\frac{dy}{dt}-1$

3. I expect you have to actually make the substitution $\displaystyle z = y + t$.

Then $\displaystyle y = z - t \implies \frac{dy}{dt} = \frac{dz}{dt} - 1$.

Substituting into the DE $\displaystyle \frac{dy}{dt} = (y + t)^2$ gives

\displaystyle \begin{align*} \frac{dz}{dt} - 1 &= z^2 \\ \frac{dz}{dt} &= z^2 + 1 \\ \frac{1}{z^2 + 1}\,\frac{dz}{dt} &= 1 \\ \int{\frac{1}{z^2 + 1}\,\frac{dz}{dt}\,dt} &= \int{1\,dt} \\ \int{\frac{1}{z^2 + 1}\,dz} &= t + C_1 \\ \arctan{z} + C_2 &= t + C_1 \\ \arctan{z} &= t + C \textrm{ where }C = C_1 - C_2 \\ z &= \tan{(t + C)} \\ y + t &= \tan{(t + C)} \\ y &= \tan{(t + C)} - t \end{align*}

4. Sorry yes its y=z-t, so yes I rearranged it to z=y+t. Sorry I typed the wrong thing.

Can you take a 1/2 out of the LHS and put a two on top integrate to (1/2)log(z^2+1)?

5. Originally Posted by TeaWithoutMussolini
Sorry yes its y=z-t, so yes I rearranged it to z=y+t. Sorry I typed the wrong thing.

Can you take a 1/2 out of the LHS and put a two on top integrate to (1/2)log(z^2+1)?
Absolutely not. You can only use the method you have suggested if the derivative of $\displaystyle z^2 + 1$, i.e. $\displaystyle 2z$ is a factor.

The integral of $\displaystyle \frac{1}{1 + x^2}$ is $\displaystyle \arctan{x}$.

6. You see there's me being stupid again thinking d/dz z^2 = 2, of course it isn't! my brain sometimes, seriously :S

Yeah I get that I just miscalculated what I was thinking of. Thanks for putting me back in my place lol.

so y(t) = tan(t+c) - t, that is the final solution? that's what I have.

7. Originally Posted by TeaWithoutMussolini
You see there's me being stupid again thinking d/dz z^2 = 2, of course it isn't! my brain sometimes, seriously :S

Yeah I get that I just miscalculated what I was thinking of. Thanks for putting me back in my place lol.

so y(t) = tan(t+c) - t, that is the final solution? that's what I have.
It's the final answer if you don't have any boundary conditions to find C...