# Differential Equations: Solve the following

• komarxian
In summary: If you want to find the integrating factor ##p(x)##, you should use the following formula:$$p(x) = \frac{e^{\ln(\cos x)}}{e^{\ln(\cos x + k)}}$$ where ##k## is a constant. In summary, you made a sign error when finding the integrating factor ##p(x)##, and you should use the following formula to find it.
komarxian

## Homework Statement

Solve the following differential equations/initial value problems:

(cosx) y' + (sinx) y = sin2x

## Homework Equations

I've been attempting to use the trig ID sin2x = 2sinxcosx.
I am also trying to solve this problem by using p(x)/P(x) and Q(x)

## The Attempt at a Solution

[/B]
cosx y' +sinx y = 2sinxcosx

y' + tanx y = 2 sinx

P(x) = tanx, Q(x) = 2sinx

--> p(x) = e^lncosx + c = e^ lncosx e^c = C cos x (if e^c = C)

Dx = p(x)Q(x) = Ccosx (2sinx) = c 2 sinxcosx = Csin2x

p(x) y(x) = int( Dx ) dx = int( Csin2x) dx = C -cos2x/2 + C

y(x) = C -cos2x/2(Ccosx) + C/Ccosx = -Ccos2x/2(Ccosx) + 1/cosx = -Ccos2x/2(Ccosx) + secx

I'm kind of confused, because my constant C disappears at some point, and the answer is supposed to be

any recommendations as to where I went wrong?

#### Attachments

• gif&s=50&w=226.&h=18.gif
1.8 KB · Views: 776
komarxian said:

## Homework Statement

Solve the following differential equations/initial value problems:

(cosx) y' + (sinx) y = sin2x

## Homework Equations

I've been attempting to use the trig ID sin2x = 2sinxcosx.
I am also trying to solve this problem by using p(x)/P(x) and Q(x)

## The Attempt at a Solution

[/B]
cosx y' +sinx y = 2sinxcosx

y' + tanx y = 2 sinx

P(x) = tanx, Q(x) = 2sinx

--> p(x) = e^lncosx + c = e^ lncosx e^c = C cos x (if e^c = C)

Dx = p(x)Q(x) = Ccosx (2sinx) = c 2 sinxcosx = Csin2x

p(x) y(x) = int( Dx ) dx = int( Csin2x) dx = C -cos2x/2 + C

y(x) = C -cos2x/2(Ccosx) + C/Ccosx = -Ccos2x/2(Ccosx) + 1/cosx = -Ccos2x/2(Ccosx) + secx

I'm kind of confused, because my constant C disappears at some point, and the answer is supposed to be
View attachment 228687

any recommendations as to where I went wrong?

If ##y'(x) + p(x) y(x) = q(x),## the solution is of the form
$$y(x) = e^{-P(x)} \int_0^x q(t) e^{P(t)} \, dt + c e^{-P(x)},$$
where ##P(w) = \int_0^w p(u) \, du## for any ##w##.

Note that if we include another constant of integration alongside ##P## (so we replace ##P(w)## by ##P(w)+k## for a constant ##k##) the constant cancels in the first term, and replaces ##c## by ##c e^{-k} = \text{another constant}## in the second term.

komarxian
komarxian said:
y' + tanx y = 2 sinx

P(x) = tanx, Q(x) = 2sinx

--> p(x) = e^lncosx + c = e^ lncosx e^c = C cos x (if e^c = C)
You made a sign error when finding the integrating factor ##p(x)##. If you differentiate ##\log \cos x##, you get ##-\tan x##.

Also, if you differentiate ##y \cos x##, you get ##(\cos x) y' + (-\sin x) y##, which isn't the lefthand side of the DE you started with.

## 1. What is a differential equation?

A differential equation is an equation that describes the relationship between a function and its derivatives. It involves the independent variable, the dependent variable, and the derivative of the dependent variable with respect to the independent variable.

## 2. Why are differential equations important?

Differential equations are important because they are used to model and solve many real-world problems in various fields such as physics, biology, economics, and engineering. They are powerful tools for predicting and understanding the behavior of complex systems.

## 3. What is the process for solving a differential equation?

The process for solving a differential equation involves first identifying the type of equation (e.g. linear, separable, exact, etc.) and then using various methods such as separation of variables, integration, substitution, or using specific formulas to solve for the unknown function.

## 4. What is the difference between ordinary and partial differential equations?

Ordinary differential equations involve only one independent variable, whereas partial differential equations involve more than one independent variable. This means that the derivatives in partial differential equations are taken with respect to different variables, while in ordinary differential equations, all derivatives are taken with respect to the same variable.

## 5. What are some applications of differential equations?

Some common applications of differential equations include modeling population growth, predicting the motion of objects in physics, analyzing electrical circuits, and understanding chemical reactions. They are also used in fields such as finance, medicine, and ecology to model and solve various problems.

• Calculus and Beyond Homework Help
Replies
8
Views
828
• Calculus and Beyond Homework Help
Replies
3
Views
436
• Calculus and Beyond Homework Help
Replies
5
Views
720
• Calculus and Beyond Homework Help
Replies
18
Views
1K
• Calculus and Beyond Homework Help
Replies
2
Views
365
• Calculus and Beyond Homework Help
Replies
21
Views
984
• Calculus and Beyond Homework Help
Replies
5
Views
665
• Calculus and Beyond Homework Help
Replies
3
Views
208
• Calculus and Beyond Homework Help
Replies
6
Views
853
• Calculus and Beyond Homework Help
Replies
4
Views
799