Differential Equation by Separation of Variables

  • #1

Homework Statement



Solve the differential equation: [itex]y' + cos(x)y = cos(x)[/itex]

The Attempt at a Solution


[itex]y' = cos(x)(1 -y)[/itex]
[itex]\frac{dy}{1-y} = cos(x) dx[/itex]
[itex]-ln|1-y| = sin(x) + C[/itex]
[itex]\frac{1}{1-y} = e^{sin(x)} + C[/itex]
[itex]1-y = \frac{1}{e^{sin(x)} + C}[/itex]
[itex]y = \frac{-1}{e^{sin(x)} + C} + 1[/itex]

Have I done this correctly?
 

Answers and Replies

  • #2
Dick
Science Advisor
Homework Helper
26,263
619
No. e^(sin(x)+C) isn't the same as e^sin(x)+C.
 
  • #3
So I know [itex]e^{sin(x) + C} = e^{sin(x)}e^C[/itex]. But since [itex]e^C[/itex] is just a constant, can't I just compress it into the constant C?
 
  • #4
Dick
Science Advisor
Homework Helper
26,263
619
So I know [itex]e^{sin(x) + C} = e^{sin(x)}e^C[/itex]. But since [itex]e^C[/itex] is just a constant, can't I just compress it into the constant C?

Yes, but that makes it C*e^(sin(x)), doesn't it?
 
  • #5
so I should write,

[itex]\frac{1}{1-y} = e^{sin(x)}C[/itex]
[itex]1-y = \frac{1}{e^{sin(x)}C}[/itex], and C is totally arbitrary so write,
[itex]y = \frac{C}{e^{sin(x)}} + 1[/itex]
 
  • #6
Dick
Science Advisor
Homework Helper
26,263
619
so I should write,

[itex]\frac{1}{1-y} = e^{sin(x)}C[/itex]
[itex]1-y = \frac{1}{e^{sin(x)}C}[/itex], and C is totally arbitrary so write,
[itex]y = \frac{C}{e^{sin(x)}} + 1[/itex]

I think that works.
 

Related Threads on Differential Equation by Separation of Variables

Replies
5
Views
2K
Replies
4
Views
4K
Replies
8
Views
4K
Replies
2
Views
2K
Replies
1
Views
3K
Replies
22
Views
4K
Replies
8
Views
930
Replies
3
Views
3K
Replies
4
Views
1K
Top