# Solve the system of differential equations

ver_mathstats
Homework Statement:
Find the solution (x(t),y(t)) to the system.
Relevant Equations:
dx/dt = -2x, dy/dt=-y+x^2
I have my set of differential equations which is dx/dt = -2x, dy/dt=-y+x2, with the initial conditions x(0)=x0 and y(0)=y0. I'm a little confused about how to approach this problem.

I thought at first I would differentiate both sides of dx/dt = -2x in order to get d2x/dt2 = -2, and then I would substitute this into the other equation but I don't really know if this is the right approach and I am a little confused. Or would I just solve for x in the first equation and then substitute?

Any help would be appreciated on how to start this problem, thank you.

## Answers and Replies

Mentor
Homework Statement:: Find the solution (x(t),y(t)) to the system.
Relevant Equations:: dx/dt = -2x, dy/dt=-y+x^2

I have my set of differential equations which is dx/dt = -2x, dy/dt=-y+x2, with the initial conditions x(0)=x0 and y(0)=y0. I'm a little confused about how to approach this problem.

I thought at first I would differentiate both sides of dx/dt = -2x in order to get d2x/dt2 = -2,
Why would you think that would be helpful? Instead, solve the equation dx/dt = -2x to find x(t) as a function of t.

Then replace x2 in the 2nd equation, and you'll have dy/dt + y = <function of t>, which can be solved by straightforward means.
ver_mathstats said:
and then I would substitute this into the other equation but I don't really know if this is the right approach and I am a little confused. Or would I just solve for x in the first equation and then substitute?

Any help would be appreciated on how to start this problem, thank you.

Delta2
ver_mathstats
Why would you think that would be helpful? Instead, solve the equation dx/dt = -2x to find x(t) as a function of t.

Then replace x2 in the 2nd equation, and you'll have dy/dt + y = <function of t>, which can be solved by straightforward means.
Oh thank you, that makes so much sense, I was just over complicating it then. I did solve it to get x(t)=e-2t+C, but we don't worry about the constant till the very end right? Or am I wrong when I say that? So would it just be x(t)=e-2t?

Homework Helper
Gold Member
Homework Statement:: Find the solution (x(t),y(t)) to the system.
Relevant Equations:: dx/dt = -2x, dy/dt=-y+x^2

I thought at first I would differentiate both sides of dx/dt = -2x in order to get d2x/dt2 = -2, and then I would substitute this into the other equation but I don't really know if this is the right approach and I am a little confused.
No what you saying above is wrong. Differentiating both sides of the aforementioned equation with respect to t, (if we differentiate with respect to x we still don't get what you are saying above) gives instead $$\frac{d^2x}{dt^2}=-2\frac{dx}{dt}$$.

ver_mathstats
ver_mathstats
No what you saying above is wrong. Differentiating both sides of the aforementioned equation with respect to t, (if we differentiate with respect to x we still don't get what you are saying above) gives instead $$\frac{d^2x}{dt^2}=-2\frac{dx}{dt}$$.
Yes I understand that now, I realized I was doing it completely wrong, sorry about that.

Delta2
Mentor
Oh thank you, that makes so much sense, I was just over complicating it then. I did solve it to get x(t)=e-2t+C, but we don't worry about the constant till the very end right? Or am I wrong when I say that? So would it just be x(t)=e-2t?
No, you need to put the constant in. ##x(t) = e^{-2t + C} = e^{-2t}e^C## is correct, but you could also write it as ##x(t) =C'e^{-2t}##, where ##C' = e^C##.

ver_mathstats
ver_mathstats
No, you need to put the constant in. ##x(t) = e^{-2t + C} = e^{-2t}e^C## is correct, but you could also write it as ##x(t) =C'e^{-2t}##, where ##C' = e^C##.
Alright thank you, so we just now solve dy/dt+y=Ce-4t using our integrating factor from my understanding?

Mentor
Alright thank you, so we just now solve dy/dt+y=Ce-4t using our integrating factor from my understanding?
Yes, and this one is straightforward. Once you have y(t), you have the solution to the system of equations, because you already have x(t). Finally, you can substitute in the initial conditions x(0) and y(0).

ver_mathstats
ver_mathstats
Yes, and this one is straightforward. Once you have y(t), you have the solution to the system of equations, because you already have x(t). Finally, you can substitute in the initial conditions x(0) and y(0).
Yes, thank you for the help, I have it solved now for y(t), I think I got it now, the next part of the question which I didn't include initially, asked for: which data (x0,y0) does the solution exist for all time, this is just asking for existence and uniqueness right? Or am I misunderstanding this as well?

Mentor
2022 Award
Don't forget that ##x\equiv 0## is also a solution. It is not covered by ##e^C##, only by ##C'=0##.

ver_mathstats
Don't forget that ##x\equiv 0## is also a solution. It is not covered by ##e^C##, only by ##C'=0##.
Oh okay, thank you, that makes sense.