1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ordinary differential equaiton

  1. Apr 13, 2008 #1
    1. The problem statement, all variables and given/known data

    dy/dt = -y + cos(pi*t)

    2. Relevant equations



    3. The attempt at a solution

    first, i took the y to the other side and then found an integraing factor to be e^t;
    multiplied the ODE by e^t then integrated both sides wrt t. i have the initial condition
    y(2)=4
    so my general solution is:
    y = {(pi*sin(pi*t) + (cos(pi*t))/[pi(pi+1)] } + {e^t(4-1/(pi(pi+1)))}

    Is this correct?
     
  2. jcsd
  3. Apr 13, 2008 #2
    I end up getting c = 4e^2 and y = (1/(pi*e^t))sin(pi*t)+4e^(2-t) When you solve for c the sin term should become 0 and you just multiply over the e^2. This is my first post, but I hope it helps.
     
  4. Apr 13, 2008 #3

    lurflurf

    User Avatar
    Homework Helper

    gey in a habit of checking your solution in the equation
    if
    y = {(pi*sin(pi*t) + (cos(pi*t))/[pi(pi+1)] } + {e^t(4-1/(pi(pi+1)))}
    is
    dy/dt = -y + cos(pi*t)
    with
    y(2)=4
     
  5. Apr 13, 2008 #4
    how did you get to that?
    For c, i got (4e^2)-(e^2/pi(pi+1))
     
  6. Apr 13, 2008 #5
    I got

    [tex]
    y(t) = \frac{(\cos \pi t + \pi \sin \pi t)}{\pi^2+1} + e^{2 - t}\left ( 4 - \frac{1}{\pi^2 + 1}} \right )
    [/tex]

    And I checked it with the DE and IC and everything seems to be in order.
     
  7. Apr 13, 2008 #6
    Oh, I'm sorry. I think David is right. I forgot to multiply the right side by the integrating factor before integrating.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?