How Do You Solve dy/dt = t - y and Its Variations?

  • Thread starter msimmons
  • Start date
  • Tags
    Ode
In summary: If you get stuck, ask again.In summary, the conversation discusses solving a first-order differential equation with the form \frac{dy}{dt}=t-y, where y is a function of t. The conversation mentions two methods for solving this equation: using the linearity property or finding an integrating factor. Both methods can be applied to the equation \frac{dy}{dt}=\frac{e^{\frac{t}{a}}}{a} + \frac{y}{b}. The solution for this equation is y=A\cdot e^{t/b}+\frac{b}{b-a} e^{t/a} for a not equal to b and y=\left(A+\frac{t}{a}\right) e^{
  • #1
msimmons
17
0
[tex]\frac{dy}{dt}=t-y[/tex]
Where y is a function of t.

Just... not quite sure how to do it.
Also, would the method change if it was e^-t instead of t? I don't see why it would, but if it does, that's what I'm actually working with.

Thanks for any help.
 
Physics news on Phys.org
  • #2
First look at dy/dt= -y. That's easy to solve and gives the general solution to the associated "homogeneous equation".

Now, try something of the form y= At+ B, for constants A and B. Put that into the equation and try to find A and B that will make the equation true.

Finally, use the "linearity" property: the sum of the general solution to the associated homogeneous equation and any solution to the entire equation is the general solution to the entire equation.

Or, since this is a first order equation, look for an "integrating factor". Rewrite the equation as dy/dt+ y= t and look for a function v(t) such that vdy/dt+ vy is an "exact derivative. That is, such that vdy/dt+ vy= d(vy)/dt. Differentiating on the right, using the product rule, gives vdy/dt+ vy= vdy/dt+ (dv/dt)y. The first terms on both sides are the same so we must have vy= (dv/dt)y or dv/dt= v. A solution to that is v= et. Multiplying dy/dt+ y= t by et, we get etdy/dt+ ety= d(ety)/dt= tet. Integrate both sides of that (use integration by parts on the right).

Both methods will work perfectly well with e-t instead of t. Try y= Ae-t instead of At+ B and solve for A.
 
  • #3
ugh, of course. (second method)
So trivial once you're reminded ^^
Thanks.

So from
[tex]\frac{dy}{dt}=\frac{e^{\frac{t}{a}}}{a} + \frac{y}{b}[/tex]

we get

[tex]\frac{d(ye^\frac{t}{b})}{dt}=\frac{e^{\frac{t}{a}-\frac{t}{b}}}{a}[/tex]

which gives the solution (assuming at t=0 y=0)
[tex]
y = \frac{-abe^{\frac{t}{a} - \frac{2t}{b}}}{a(a-b)}
[/tex]

... Right? If anyone feels like wasting a bit of time

Edit: I'm awesome at canceling variables.

[tex]
y = \frac{be^{\frac{t}{a} - \frac{2t}{b}}}{b-a}
[/tex]
 
Last edited:
  • #4
msimmons, it is not so trivial. Use the first method mentioned by HallsofIvy. So consider the following:

[tex]\frac{dy}{dt}-\frac{y}{b}=0[/tex]

This has the solution:

[tex]\frac{dy}{y}=\frac{dt}{b} \qquad \rightarrow \qquad y_h=A\cdot e^{t/b}[/tex]

Now to obtain the solution to the entire equation:

[tex]\frac{dy}{dt}-\frac{y}{b}=\frac{e^{t/a}}{a}[/tex]

you need to distinguish between two cases, i.e. whether a and b are different or not. The first case, a not equal to b, you should set:

[tex]y_p=\alpha e^{t/a}[/tex]

putting this into the differential equation gives now:

[tex]\alpha=\frac{b}{b-a}[/tex]

and thus:

[tex]y_p=\frac{b}{b-a} e^{t/a}[/tex]

The complete solution is now:

[tex]y=A\cdot e^{t/b}+\frac{b}{b-a} e^{t/a}[/tex]

which makes it clear why they should be different... The other case can be solved by setting:

[tex]y_p=\alpha t e^{t/a}[/tex]

Giving you:

[tex]\alpha=\frac{1}{a}[/tex]

and thus:

[tex]y_p=\frac{t}{a} e^{t/a}[/tex]

and for the complete solution:

[tex]y=\left(A+\frac{t}{a}\right) e^{t/a}[/tex]

Applying the boundary condition is something you can do now by yourself. Look back into your book for these different cases, it's an important issue. Finally do the calculations again by yourself, don't use them just like that.
 

FAQ: How Do You Solve dy/dt = t - y and Its Variations?

1. What is an ODE?

An ODE, or ordinary differential equation, is a mathematical equation that describes the relationship between a dependent variable and its derivatives with respect to one or more independent variables.

2. How do you solve an ODE?

The general method for solving an ODE is to first identify the type of equation and then use specific techniques such as separation of variables, substitution, or integration to find a solution. In the case of the equation dy/dt = t-y | y(t), we can use separation of variables to solve for y(t).

3. What is the significance of the t-y term in the ODE dy/dt = t-y | y(t)?

The t-y term represents the rate of change of y with respect to time. In other words, it describes how the value of y is changing as time passes.

4. How do you interpret the solution to an ODE?

The solution to an ODE is a function that satisfies the given equation. In this case, the solution to dy/dt = t-y | y(t) is the function y(t) that, when differentiated with respect to t, gives the value of t-y. This solution can be interpreted as the value of y at any given time t.

5. Can an ODE have multiple solutions?

Yes, depending on the initial conditions and the specific method used to solve the equation, an ODE can have multiple solutions. It is important to check the initial conditions and make sure they are satisfied by the chosen solution.

Similar threads

Replies
6
Views
1K
Replies
8
Views
2K
Replies
1
Views
1K
Replies
6
Views
1K
Replies
7
Views
2K
Back
Top