Solve First order linear differential equation, initial conditions

  • Thread starter NCyellow
  • Start date
  • #1
22
0

Homework Statement


The problem is given as follows:
Solve
dy/dt + y = 0.5, y(t=0)=1


Homework Equations





The Attempt at a Solution


I separate the y terms from the t terms, which gives me
dy(-y+0.5)=dt
I integrate both sides to get
-ln(-y+0.5)=t+C
C is the constant, I combine the constants from both sides to one value.
Multiplying both sides by the negative,
ln(-y+0.5)=-t-C
Now i e both sides
-y+0.5=e^(-t-C)
Therefore I can simplify to y=e^(-t-C)+0.5, which is my solution
Since y(0)=1,
e^(-C) = 0.5
I don't know what exactly I am supposed to do with that...
Was my answer correct?
Please advise, Thank you!
 
Last edited:

Answers and Replies

  • #2
1,444
0
surely you mean [itex]e^{-C}=1.5[/itex]
 
  • #3
22
0
surely you mean [itex]e^{-C}=1.5[/itex]

Wrote the signs wrong, fixed now.
 
  • #4
HallsofIvy
Science Advisor
Homework Helper
41,847
967

Homework Statement


The problem is given as follows:
Solve
dy/dt + y = 0.5, y(t=0)=1


Homework Equations





The Attempt at a Solution


I separate the y terms from the t terms, which gives me
dy(-y+0.5)=dt
dy/(-y+0.5)= dt

I integrate both sides to get
-ln(-y+0.5)=t+C
C is the constant, I combine the constants from both sides to one value.

Multiplying both sides by the negative,
ln(-y+0.5)=-t-C
Now i e both sides
-y+0.5=e^(-t-C)
Therefore I can simplify to y=e^(-t-C)+0.5, which is my solution
Since y(0)=1,
e^(-C) = 0.5
I don't know what exactly I am supposed to do with that...
Was my answer correct?
Please advise, Thank you!
[itex]-y+0.5= e^{-t-C}[/itex] is NOT equivalent to [itex]y= e^{-t-C}+0.5[/itex].

Subtracting 0.5 from each side of [itex]-y+0.5= e^{-t-C}[/itex] gives [itex]-y= e^{-t-C}- 0.5[/itex] and then, multiplying both sides by -1, [itex]y= 0.5- e^{-t-C}[/itex].

Now, taking y= 1 when t= 0, [itex]1= 0.5- e^{-C}[/itex] so [itex]e^{-C}= 0.5[/itex] still.
And [itex]e^{-t-C}= e^{-t}e^{-C}[/itex]. Since [itex]e^{-C}= 0.5[/itex], [itex]e^{-t-C}= 0.5e^{-t}[/itex] and your solution is [itex]y= 0.5- 0.5e^{-t}[/itex]
 

Related Threads on Solve First order linear differential equation, initial conditions

Replies
1
Views
999
Replies
3
Views
2K
Replies
7
Views
2K
Replies
1
Views
1K
Replies
3
Views
1K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
9
Views
3K
Top