Solving Diff EQ: y'=2cos^2x-sin^2x+y^2 w/y(0)=2

  • Thread starter tylersmith7690
  • Start date
  • Tags
    Diff eq
In summary: You can use the quadratic Formula: $$C=\frac{1}{2}\left(\frac{x^2}{2C}\right)+\frac{1}{2}\left(\frac{y^2}{2C}\right)$$
  • #1
tylersmith7690
21
0

Homework Statement



For the following differential equation:

dy/dx = [itex]\frac{2cos^2x-sin^2x+y^2}{2 cosx}[/itex] , -pi/2 < x < pi/2

show that the substitution y(x)=sin x + 1/u(x) yeilds the differential equation for u(x),

du/dx = -u tan x - [itex]\frac{1}{2}[/itex]sec x

Hence find the solution y(x) to the original differential equation that satisfies the condition y(0)=2
Find the interval on which the solution to the initial value problem is defined.



Homework Equations



I have no idea where to go next to get y(x).


The Attempt at a Solution



using y= sinx + 1/u
dy/dx = cos x - 1/u^2 du/dx

then let this dy/dx = dy/dx in the original equation and solve for du.

cos x [itex]\frac{-1}{u^2}[/itex]du/dx = [itex]\frac{2cos^2x-sin^2x+y^2}{2cosx}[/itex]

cos x[itex]\frac{-1}{u^2}[/itex]du/dx= [itex]\frac{2 cos^2x+ (2/u) sinx + 1/u^2}{2cosx}[/itex]

[itex]\frac{-1}{u^2}[/itex]du/dx = [itex]\frac{1}{u}[/itex][itex]\frac{sinx}{cosx}[/itex]+[itex]\frac{1}{u^2}[/itex][itex]\frac{1}{2cosx}[/itex]

times through by -1/u^2

du/dx= -u tan x -1/2 sec x

Now du/dx + u tanx = -1/2 sec x, which is a first order linear equation

so integrating factor is I= sec x

so , sec x dx/du + u tanx sec x = -1/2 sec^2 x

so sec x u= [itex]\int -(1/2). sec^2 x[/itex]

= - 1/2 tan x +C

divide through by sec x

u= -1/2 sin x + C(cos x) [general solution]

now if i sub in u= 1/(y-sin x)

i can't rearrange it to get y by itself. This is where I am stuck.

Sorry for the poor latex use. I have little knowledge of it atm.
 
Physics news on Phys.org
  • #2
You have a solution: ##u(x)=\frac{1}{2}\sin x + C\cos x##
You want to sub in: ##u(x)=1/(y(x)-\sin x)##
... and make y(x) the subject?

I don't see the problem - blind substitution gives you:
$$\frac{1}{y(x)-\sin x} = \frac{1}{2}\sin x + C\cos x$$ ... you got this far right?
Put the RHS under a common denominator then invert both sides.
Note: this is also a LaTeX lesson ;)
 
  • #3
I don't see how you get y by itself. Maybe my algebra is way off. And i believe the RHS should have a negative before the 1/2 sin x.

Any help would be welcomed.
 
  • #4
Please note: I am not allowed to do the working for you.
Put the RHS under a common denominator then invert both sides - as suggested in post #2.
If you are still stuck, please write down the working you have done in your reply.

Exercise:
Make y the subject in this example:
$$\frac{1}{y+5}=\frac{x}{2}+2$$
 
  • #5
1/ (y-sinx) = -sinx/2 + C cosx

= (-sinx +2 C cos x)/2

y-sinx = 2/(-sinx +2 C cos x)

y= 2/(-sinx +2 C cos x) +sin x

y= [2 + sinx ( 2 cosx - sin x)]/ 2 cos x - sin x

y = (2 + 2 C sin x cos x -sin^2 x ) / ( 2 cos x - sin x)

y= 2+ C sin 2x - sin^2x / 2 cos x - sinx

This obviously can't be true because i need to find c and can't do this if i sub y=2 and x=0. But yeah that's my attempt.
 
  • #6
tylersmith7690 said:
1/ (y-sinx) = -sinx/2 + C cosx

= (-sinx +2 C cos x)/2

y-sinx = 2/(-sinx +2 C cos x)

y= 2/(-sinx +2 C cos x) +sin x
Whew you made it!
Why did you keep going?
y= [2 + sinx ( 2 cosx - sin x)]/ 2 cos x - sin x

y = (2 + 2 C sin x cos x -sin^2 x ) / ( 2 cos x - sin x)

y= 2+ C sin 2x - sin^2x / 2 cos x - sinx

This obviously can't be true because i need to find c and can't do this if i sub y=2 and x=0.
That's because you left out a C in the denominator in the last two lines. You left it out completely in the first line, and you forgot the brackets in the last line. When you are having trouble is the time to be extra careful about what you write down - take your time.

You don't need all that anyway...

Start with the step I put in boldface (above). Here it's formatted for you: $$y=\frac{2}{2C\cos x - \sin x}+\sin x$$ ... now find C given (x,y)=(0,2).
Hint: this is one of those situations where it is better to do the substitution before you do the algebra.
 
Last edited:

Related to Solving Diff EQ: y'=2cos^2x-sin^2x+y^2 w/y(0)=2

1. What is a differential equation?

A differential equation is an equation that involves an unknown function and its derivatives. It describes the relationship between a function and its rate of change.

2. How do you solve a differential equation?

The process of solving a differential equation involves finding a function that satisfies the equation. This can be done through various methods such as separation of variables, substitution, or using an integrating factor.

3. What is the initial condition in this particular differential equation?

The initial condition in this equation is y(0) = 2. This means that the function y must equal 2 when x = 0.

4. How do you solve a differential equation with non-constant coefficients?

When the coefficients in a differential equation are not constant, the equation is considered to be a non-homogeneous equation. In this case, the solution involves using techniques such as variation of parameters or the method of undetermined coefficients.

5. What are the applications of differential equations in science?

Differential equations have various applications in science, including modeling physical systems such as motion, heat transfer, and electric circuits. They are also used in economics, biology, and engineering to understand and predict complex systems.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
631
  • Calculus and Beyond Homework Help
Replies
6
Views
773
  • Calculus and Beyond Homework Help
Replies
1
Views
501
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
354
  • Calculus and Beyond Homework Help
Replies
4
Views
704
  • Calculus and Beyond Homework Help
Replies
8
Views
773
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
558
Back
Top