# Exponential Diff Equations

## Homework Statement

Here is the question: solve y'[t]+0.2y[t]=Sin[t] with y[0]=15.3

How do I come up with a formula for y[t]?

## Homework Equations

y[t]= starter+e^-rt

## The Attempt at a Solution

I attempted to solve the equation as is. After doing some algebra, y[t]=15.3e^-0.2 and when put back into the original equation ( y'[t]+0.2y[t]=Sin[t]), and taking y'[t], I get 0 on the LHS of the equation which doesn't equal sin[t]. I know that isn't right. What am I doing wrong?

Mark44
Mentor
You need to look at this in two parts:
The complementary solution to the homogeneous equation y' + 0.2y = 0. (Call this yc.)

A particular solution to the nonhomogeneous equation y' + 0.2y = sin(t). (Call this yp.)

For yc, you should have yc = c1e-.2t.

For the particular solution, try yp = Asin(t) + Bcos(t). Substitute this into your differential equation so that you can find the coefficients A and B.

The general solution is y = yh + yp. The initial condition can be used to get c1.

Would yp= y'[t]+0.2y[t]-sin[t]= Asin(t) + Bcos(t)?

LCKurtz
Homework Helper
Gold Member
You could also note that e.2t is an integrating factor. Multiply the equation through by that and integrate both sides of the resulting equation from 0 to t.

Mark44
Mentor
Would yp= y'[t]+0.2y[t]-sin[t]= Asin(t) + Bcos(t)?
No.
y' + .2y - sin(t) $\equiv$ 0 for any solution of the original differential equation.
yp $\neq$ 0, nor is Asin(t) + Bcos(t).

Ok. So, y'[Asin(t) + Bcos(t)]+0.2y[Asin(t) + Bcos(t)]=sin[t]?

Mark44
Mentor
Your notation is off a bit, but I understand what you're trying to say, which is this:
d/dt(Asin(t) + Bcos(t)) + 0.2(Asin(t) + Bcos(t)) = sin(t)

The equation above has to be identically true; i.e., true for all values of t. For this reason, the coefficients of the sine and cosine terms on the left have to be equal to the same coefficients on the right.

Mark44,

So, I can chose whatever co-effiecients I want?......to test it.

Mark44
Mentor
For A and B? No, you have to solve for them. See what I said in post #7.

Mark44,

That helped. Thanks. What changes when the differential equation is

(y^\[Prime])[t]= - 0.2 y[t] + Sin[t] with y[0]=15.3 and I need to come up with the

formula for y[t]?

Mark44
Mentor
Nothing changes. This equation is equivalent to the one on your OP, and the initial condition is the same, too.

Why do you write y' in such a complicated form? I.e., (y^\[Prime])[t]. This is much simpler as y' or y'(t).

I'm just hijacking this old thread for a second, sorry in advance

$$t$$

$$\displaystyle t$$