Stuck trying to integrate dy/dx-y=cos(x)-2

  • Thread starter Thread starter dooogle
  • Start date Start date
  • Tags Tags
    Integrate Stuck
Click For Summary
SUMMARY

The discussion focuses on solving the differential equation dy/dx - y = cos(x) - 2 using integration techniques. The solution involves the integrating factor e^(-x) and requires integration by parts to evaluate the integral of cos(x)e^(-x). The final expression for y is derived as y = 1/(-2 + (sin(x) + cos(x))/2 + c/(e^(-x))). The use of Euler's formula is suggested as an alternative method for simplifying the integration of cos(x).

PREREQUISITES
  • Understanding of first-order linear differential equations
  • Familiarity with integrating factors and their application
  • Proficiency in integration by parts
  • Knowledge of Euler's formula for complex exponentials
NEXT STEPS
  • Study the application of integrating factors in solving linear differential equations
  • Learn advanced techniques for integration by parts
  • Explore Euler's formula and its applications in integration
  • Practice solving differential equations involving exponential functions and trigonometric integrals
USEFUL FOR

Students studying differential equations, mathematics educators, and anyone seeking to improve their integration techniques in calculus.

dooogle
Messages
20
Reaction score
0

Homework Statement



integrate

dy/dx-y=cos(x)-2

Homework Equations


The Attempt at a Solution



dy/dx-y=cos(x)-2

is in the form

dy/dx+p(x)=q(x)

take the I.F as e^int(p(x))dx=e^-x

multiplying throughout by e^-x

d(e^-x)z/dx=-(cos(x)e^-x)-(2e^-x)

(e^-x)z=-int((cos(x)e^-x)-(2e^-x))dx

so -int((cos(x)e^-x)-(2e^-x))dx=-int(cos(x)(e^-x)dx-2int(e^-x)dx

2int(e^-x)dx=-2(e^-x)+c

-int(cos(x)(e^-x)) this is where i have trouble I am not sure if my method is correct using integration by parts multiple times

1st integration
let u=e^(-x) du/dx=-e^(-x) dv/dx=cos(x) v=-sin(x)

-int(cos(x)(e^-x))dx = -e^(-x)sin(x)+int(-sin(x)e^(-x))dx

2nd integration
int(-sin(x)e^(-x))dx
let u=e^(-x) du/dx=-e^(-x) dv/dx=-sin(x) v=cos(x)

e^(-x)cos(x)+int(cos(x)(e^-x))dx

so

-int(cos(x)(e^-x)dx=-e^(-x)sin(x)+e^(-x)cos(x)+int(cos(x)(e^-x))dx

this is where I am not sure i take away from both sides int(cos(x)(e^-x))dx giving

-2int(cos(x)(e^-x)dx=-e^(-x)sin(x)+e^(-x)cos(x)

int(cos(x)(e^-x)dx=e^(-x)/2(sin(x)+cos(x))

so
(e^-x)z=-2(e^-x)+c+e^(-x)/2(sin(x)+cos(x))+c

z=-2+(sin(x)+cos(x))/2+c/(e^-x)

1/y=-2+(sin(x)+cos(x))/2+c/(e^-x)

y=1/(-2+(sin(x)+cos(x))/2+c/(e^-x))

thank you for your time to recap my problems is:

im not sure if i am allowed to add integrals

cheers

dooogle
 
Physics news on Phys.org
It's easier to do that integral by using the Euler formula

[tex]e^{\pm ix} = \cos x \pm i \sin x[/tex]

to obtain an expression for [tex]\cos x[/tex] in terms of exponentials. However, your integration is correct if you mean

int(cos(x)(e^-x)dx= (e^(-x)/2 ) (sin(x)+cos(x)) +c
 
Sorry but the use of two "/"s in
y=1/(-2+(sin(x)+cos(x))/2
is meaning less to me.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
Replies
3
Views
2K
Replies
3
Views
2K
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K