Ordinary differential equaiton

In summary, the conversation is about solving the differential equation dy/dt = -y + cos(pi*t) using an integrating factor. The final solution is y = (cos(pi*t) + pi*sin(pi*t))/(pi^2+1) + e^(2-t)*(4-1/(pi^2+1)), with the initial condition y(2)=4. There is discussion about finding the constant c and checking the solution with the differential equation and initial condition.
  • #1
sara_87
763
0

Homework Statement



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

Homework Equations





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?
 
Physics news on Phys.org
  • #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.
 
  • #3
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
 
  • #4
SirOtis said:
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))
 
  • #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.
 
  • #6
Oh, I'm sorry. I think David is right. I forgot to multiply the right side by the integrating factor before integrating.
 

1. What is an ordinary differential equation (ODE)?

An ordinary differential equation is a mathematical equation that describes the relationship between a function and its derivatives. It involves one independent variable and one or more dependent variables, and the derivatives represent the rate of change of the dependent variable with respect to the independent variable.

2. What are some real-world applications of ODEs?

ODEs are used to model various physical phenomena such as population growth, chemical reactions, and electrical circuits. They are also used in engineering for designing control systems, analyzing fluid flow, and predicting the behavior of mechanical systems.

3. How do you solve an ODE?

The solution of an ODE is a function that satisfies the equation for all values of the independent variable. There are different methods for solving ODEs, including separation of variables, integrating factors, and using power series. The specific method depends on the type of ODE and its initial or boundary conditions.

4. What is the difference between an ODE and a partial differential equation (PDE)?

The main difference is that an ODE involves only one independent variable, while a PDE involves multiple independent variables. In other words, an ODE describes the relationship between a function and its derivatives with respect to a single variable, while a PDE describes the relationship between a function and its partial derivatives with respect to multiple variables.

5. How are ODEs used in data analysis and machine learning?

ODEs are used in data analysis and machine learning to model time-dependent data, such as stock prices, weather patterns, and physiological processes. They can also be used to predict future trends and make forecasts based on historical data. Additionally, ODEs are used in the field of neural networks to train and optimize their parameters.

Similar threads

  • Calculus and Beyond Homework Help
Replies
16
Views
551
  • Calculus and Beyond Homework Help
Replies
3
Views
401
  • Calculus and Beyond Homework Help
Replies
2
Views
905
  • Calculus and Beyond Homework Help
Replies
1
Views
524
  • Calculus and Beyond Homework Help
Replies
2
Views
367
  • Calculus and Beyond Homework Help
Replies
3
Views
263
  • Calculus and Beyond Homework Help
Replies
6
Views
216
  • Calculus and Beyond Homework Help
Replies
1
Views
275
  • Calculus and Beyond Homework Help
Replies
3
Views
558
  • Calculus and Beyond Homework Help
Replies
2
Views
494
Back
Top