Can anyone give me a solution to a differential equation of the following form:

y=A sin(wt) - ky' - c

where A,w, k and c are constants, y is a function of t and y' is dy/dt.

What is y(t)?

Printable View

- September 21st 2010, 05:46 AMian256First order ODE with trignometric function and constant term
Can anyone give me a solution to a differential equation of the following form:

y=A sin(wt) - ky' - c

where A,w, k and c are constants, y is a function of t and y' is dy/dt.

What is y(t)? - September 21st 2010, 06:32 AMProve It

.

This is first order linear, so use the integrating factor method.

The integrating factor is .

So multiplying through by the integrating factor gives

.

You should be able to go from here. You will need to use integration by parts twice. - September 21st 2010, 06:50 AMian256
Thanks, Prove It. I'll try to extract my brain from it's current torpor and see what I can make of your response.....don't hold your breath.....

- September 21st 2010, 08:17 AMian256
Well that made my brain hurt but I think I'm there. There is a useful similar example of twice integrating by parts on wikipedia. I've ended-up with something like

y=A (sin(wt) + w k cos(wt)) / (1-k w^2) - c

Please excuse my lack of mark-up.

I'll need to double check but it looks plausible and whats more, I'm surprised to find I can probably use the result!

In case you are wondering I'm trying to model charging a battery or capacitor from an altenator including the self inductance of the altenator. Many thanks again**Prove It**please spend the rest of the day with a warm glow of having helped some one a great deal.

Edit:

After going through a bit more carefully, I have

y=A (sin(wt)**-**w k cos(wt)) / (1 + k**^2**w^2) - c

which I have put back into the original ODE and verified to be a solution of it. - September 21st 2010, 09:10 AMchisigma
For a first order DE of the form...

(1)

... the general solution is...

(2)

Here is...

... and with little computation [if no mistakes from me (Thinking)...] You should find...

(3)

Kind regards

- September 21st 2010, 12:12 PMian256
Thanks chisigma.

Interesting how the answer I've got differs from the one you give.

Mine lacks the first term in chisigma's answer probably due to my laziness in omitting constants of integration here and there, but I'm fairly confident they can be neglected for my purposes. It also differs in that the cos and sin are switched and the sign of the second of them is switched. Believe they probably both solve the DE. As it happens, I think, chisigma's answer (with chi=0) better describes the situation I'm trying to model. Will check it is a valid soln....