• Support PF! Buy your school textbooks, materials and every day products Here!

Ordinary differential equaiton

  • Thread starter sara_87
  • Start date
763
0
1. Homework Statement

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

2. Homework 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?
 

Answers and Replies

2
0
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.
 
lurflurf
Homework Helper
2,418
122
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
 
763
0
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.
how did you get to that?
For c, i got (4e^2)-(e^2/pi(pi+1))
 
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.
 
2
0
Oh, I'm sorry. I think David is right. I forgot to multiply the right side by the integrating factor before integrating.
 

Related Threads for: Ordinary differential equaiton

Replies
1
Views
1K
Replies
0
Views
836
  • Last Post
Replies
6
Views
997
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
2
Views
828
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
1
Views
2K
Top