Results 1 to 6 of 6

Math Help - First order ODE with trignometric function and constant term

  1. #1
    Newbie
    Joined
    Sep 2010
    Posts
    4

    First 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)?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    10,964
    Thanks
    1008
    y = A\sin{(\omega t)} - k\frac{dy}{dx} - c

    k\frac{dy}{dt} + y = A\sin{(\omega t)} - c

    \frac{dy}{dt} + \frac{1}{k}y = \frac{A}{k}\sin{(\omega t)} - \frac{c}{k}.


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

    The integrating factor is e^{\int{\frac{1}{k}\,dt}} = e^{\frac{t}{k}}.

    So multiplying through by the integrating factor gives


    e^{\frac{t}{k}}\frac{dy}{dt} + \frac{1}{k}e^{\frac{t}{k}}y = \frac{A}{k}e^{\frac{t}{k}}\sin{(\omega t)} - \frac{c}{k}e^{\frac{t}{k}}

    \frac{d}{dt}(e^{\frac{t}{k}}y) = \frac{A}{k}e^{\frac{t}{k}}\sin{(\omega t)} - \frac{c}{k}e^{\frac{t}{k}}

    e^{\frac{t}{k}}y = \int{\frac{A}{k}e^{\frac{t}{k}}\sin{(\omega t)} - \frac{c}{k}e^{\frac{t}{k}}\,dt}.


    You should be able to go from here. You will need to use integration by parts twice.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Sep 2010
    Posts
    4
    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.....
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Sep 2010
    Posts
    4
    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.
    Last edited by ian256; September 21st 2010 at 11:04 AM. Reason: Correct forula
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor chisigma's Avatar
    Joined
    Mar 2009
    From
    near Piacenza (Italy)
    Posts
    2,162
    Thanks
    5
    For a first order DE of the form...

    \displaystyle y^{'}= \alpha(t)\ y + \beta (t) (1)

    ... the general solution is...

    \displaystyle y= e^{\int \alpha(t)\ dt}\ \{ \int \beta(t)\ e^{-\int \alpha(t)\ dt}\ dt + \chi \} (2)

    Here is...

    \displaystyle \alpha(t) = -\frac{1}{k}

    \displaystyle \beta (t) = -\frac{a}{k}\ \sin \omega t - \frac{c}{k}

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

    \displaystyle y(t) = \chi\ e^{-\frac{t}{k}} + \frac{a\ \cos \omega t + \omega\ k\ \sin \omega t}{1+ k^{2}\ \omega^{2}} + c (3)

    Kind regards

    \chi \sigma
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Sep 2010
    Posts
    4
    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....
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 12
    Last Post: July 26th 2010, 03:33 AM
  2. Constant term problem
    Posted in the Pre-Calculus Forum
    Replies: 4
    Last Post: April 1st 2010, 01:16 PM
  3. 2nd ODE -- Finding Particular solution with A constant term !!
    Posted in the Differential Equations Forum
    Replies: 4
    Last Post: November 14th 2009, 05:21 AM
  4. Replies: 2
    Last Post: March 20th 2009, 04:54 AM
  5. Constant term
    Posted in the Algebra Forum
    Replies: 5
    Last Post: April 3rd 2008, 12:44 PM

Search Tags


/mathhelpforum @mathhelpforum