Second-Order ODE with Missing X

  • Thread starter Thread starter _N3WTON_
  • Start date Start date
  • Tags Tags
    Ode
_N3WTON_
Messages
350
Reaction score
3

Homework Statement


Solve the given differential equations with missing x.
y'' + y = 0

Homework Equations


y = c_1cos(x) + c_2sin(x)
This is the answer given in the back of the book. However, I can't sem to get my answer to agree

The Attempt at a Solution


First, I made some substitutions:
y' = v y'' = v'
Using the chain rule I obtained:
\frac{dv}{dx} = v\frac{dv}{dy} = v'
So the equation becomes:
v\frac{dv}{dy} + y = 0
vdv = -ydy
\int vdv = -\int ydy
\frac{v^2}{2} = - \frac{y^2}{2} + C_1
v = +- sqrt(-y + C_1)
\frac{dy}{dx} = sqrt(-y + C_1)
\int\frac{dy}{dx} = \int sqrt(-y+C_1),dx
y = \frac{2}{3} (-y+C_1)^{\frac{3}{2}} + C_2
Clearly this solution is nowhere close to the one in the back of the book, so I was hoping somebody could point out where I have gone wrong :)
 
Physics news on Phys.org
Just to be clear, at the top the two equations are y'=v and y''=v'...it is not all one equation
 
_N3WTON_ said:

Homework Statement


Solve the given differential equations with missing x.
y'' + y = 0

Homework Equations


y = c_1cos(x) + c_2sin(x)
This is the answer given in the back of the book. However, I can't sem to get my answer to agree

The Attempt at a Solution


First, I made some substitutions:
y' = v y'' = v'
Using the chain rule I obtained:
\frac{dv}{dx} = v\frac{dv}{dy} = v'
So the equation becomes:
v\frac{dv}{dy} + y = 0
vdv = -ydy
\int vdv = -\int ydy
\frac{v^2}{2} = - \frac{y^2}{2} + C_1
v = +- sqrt(-y + C_1)
\frac{dy}{dx} = sqrt(-y + C_1)
\int\frac{dy}{dx} = \int sqrt(-y+C_1),dx
y = \frac{2}{3} (-y+C_1)^{\frac{3}{2}} + C_2
Clearly this solution is nowhere close to the one in the back of the book, so I was hoping somebody could point out where I have gone wrong :)
You should always plug in a "solution" to see if it really works. Have you done that?

Surely your textbook must deal with problems similar to this one. Have you checked?
 
_N3WTON_ said:

Homework Statement


Solve the given differential equations with missing x.
y'' + y = 0

Homework Equations


y = c_1cos(x) + c_2sin(x)
This is the answer given in the back of the book. However, I can't sem to get my answer to agree

The Attempt at a Solution


First, I made some substitutions:
y' = v y'' = v'
Using the chain rule I obtained:
\frac{dv}{dx} = v\frac{dv}{dy} = v'
So the equation becomes:
v\frac{dv}{dy} + y = 0
vdv = -ydy
\int vdv = -\int ydy
\frac{v^2}{2} = - \frac{y^2}{2} + C_1
This is correct.

v = +- sqrt(-y + C_1)
But this isn't. Multiplying the first equation by 2 gives v^2= -y^2+ 2C_1
I wouldn't complain about your having "C_1" rather than "2C_2" (they are both "undetermined constants") but the difference between "y" and "y^2 is very important!

\frac{dy}{dx} = sqrt(-y + C_1)
\int\frac{dy}{dx} = \int sqrt(-y+C_1),dx
y = \frac{2}{3} (-y+C_1)^{\frac{3}{2}} + C_2
Clearly this solution is nowhere close to the one in the back of the book, so I was hoping somebody could point out where I have gone wrong :)
 
Ray Vickson said:
You should always plug in a "solution" to see if it really works. Have you done that?

Surely your textbook must deal with problems similar to this one. Have you checked?
I was quite certain my solution didn't work, I was just unsure of where I was going wrong. Also, unfortunately my textbook does not provide any examples similar to this one, this textbook is pretty lousy and I'm considering buying a new one just so I don't run into problems like this...
 
HallsofIvy said:
This is correct. But this isn't. Multiplying the first equation by 2 gives v^2= -y^2+ 2C_1
I wouldn't complain about your having "C_1" rather than "2C_2" (they are both "undetermined constants") but the difference between "y" and "y^2 is very important!
thank you
 
ok, so after adjusting my answer:
v = sqrt(-y^2 + C_1)
\int \frac{dy}{dx} = \int sqrt(-y^2 + C_1) dx
y = \frac{1}{3} (-y^2 + C_1)^{\frac{3}{2}} + C_2
I am confused about how to go from the above answer to:
C_1cos(x) + C_2sin(x)
 
_N3WTON_ said:
I was quite certain my solution didn't work, I was just unsure of where I was going wrong. Also, unfortunately my textbook does not provide any examples similar to this one, this textbook is pretty lousy and I'm considering buying a new one just so I don't run into problems like this...

OK, but never forget that Google is your friend. Looking at "linear differential equation" will turn up a host of relevant articles.

Anyway, to verify that the book's "solution" is valid involves nothing more than plugging it into see if it works. Of course, figuring out how the book got its solution in the first place is another issue. Basically, though, you just 'learn' that certain types of de's have certain types of solutions--- and that has been part of the math toolkit for more than 150 years.
 
Ray Vickson said:
OK, but never forget that Google is your friend. Looking at "linear differential equation" will turn up a host of relevant articles.

Anyway, to verify that the book's "solution" is valid involves nothing more than plugging it into see if it works. Of course, figuring out how the book got its solution in the first place is another issue. Basically, though, you just 'learn' that certain types of de's have certain types of solutions--- and that has been part of the math toolkit for more than 150 years.
thank you, and while we're at it would you happen to know off the top of your head of any good DiffEq textbooks? Not only is my book short on examples but it is also chock full of small errors that can be very confusing at times :(
 
  • #10
@n3wton: Look in your text for "constant coefficient" differential equations. Even a bad text will have that topic. Otherwise Google it.
 
  • #11
LCKurtz said:
@n3wton: Look in your text for "constant coefficient" differential equations. Even a bad text will have that topic. Otherwise Google it.
thank you, i'll search for it
 
  • #12
_N3WTON_ said:
ok, so after adjusting my answer:
v = sqrt(-y^2 + C_1)
\int \frac{dy}{dx} = \int sqrt(-y^2 + C_1) dx
y = \frac{1}{3} (-y^2 + C_1)^{\frac{3}{2}} + C_2
The last line is wrong. You can not integrate like that.

ehild
 
  • #13
_N3WTON_ said:

Homework Statement


Solve the given differential equations with missing x.
y'' + y = 0

Homework Equations


y = c_1cos(x) + c_2sin(x)
This is the answer given in the back of the book. However, I can't sem to get my answer to agree

The Attempt at a Solution


First, I made some substitutions:
y' = v y'' = v'
Using the chain rule I obtained:
\frac{dv}{dx} = v\frac{dv}{dy} = v'
So the equation becomes:
v\frac{dv}{dy} + y = 0
vdv = -ydy
\int vdv = -\int ydy
\frac{v^2}{2} = - \frac{y^2}{2} + C_1
v = +- sqrt(-y + C_1)
\frac{dy}{dx} = sqrt(-y + C_1)
\int\frac{dy}{dx} = \int sqrt(-y+C_1),dx
y = \frac{2}{3} (-y+C_1)^{\frac{3}{2}} + C_2
Clearly this solution is nowhere close to the one in the back of the book, so I was hoping somebody could point out where I have gone wrong :)

This seems a roundabout way to solve this DE. Have you studied how to form the characteristic equation for an ODE yet?
 
  • #14
SteamKing said:
This seems a roundabout way to solve this DE. Have you studied how to form the characteristic equation for an ODE yet?
The problem gave specific orders that we were to solve it using this method. However, we have not yet studied what you mentioned...
 
  • #15
ehild said:
The last line is wrong. You can not integrate like that.

ehild
no? I did:
u = -y^2 + C_1
du = -2y dy
= \frac{-1}{2} \int -2(-y^{2} + C_1) dy
= \frac{-1}{2} \int u^{\frac{1}{2}} du
= \frac{-1}{2} \frac{2}{3} u^{\frac{3}{2}}
= \frac{-1}{3} (-y^2 + C_1)^{\frac{3}{2}} + C_2
what is wrong with that?
 
  • #16
_N3WTON_ said:
no? I did:
u = -y^2 + C_1
du = -2y dy
= \frac{-1}{2} \int -2(-y^{2} + C_1) dy
= \frac{-1}{2} \int u^{\frac{1}{2}} du
= \frac{-1}{2} \frac{2}{3} u^{\frac{3}{2}}
= \frac{-1}{3} (-y^2 + C_1)^{\frac{3}{2}} + C_2
what is wrong with that?
Everything. The left side is a differential, the right side is an integral. You mixed u and y. .. Do not forget, you need to find y(x).

ehild
 
  • #17
ehild said:
Everything. The left side is a differential, the right side is an integral. You mixed u and y. .. Do not forget, you need to find y(x).

ehild
Ok, I'm confused now, I thought since v = dy/dv I could make that substitution and then integrate, would I first need to sub x for y in the equation to be integrated?
 
  • #18
You can integrate a function of x with respect to x and a function of y with respect to y.

You have ##\frac{dy}{dx} =sqrt(-y^2 + C_1) ##

Collect the y terms on one side and the x terms on the other side.

\frac{dy}{\sqrt{-y^2+C_1}}=dx

and integrate: \int{\frac{dy}{\sqrt{-y^2+C_1}}}=\int{dx}

You get something like ##-\arccos( y/\sqrt{C_1})=x+C_2##
Solve for y.

ehild
 
Last edited:
  • #19
ehild said:
You can integrate a function of x with respect to x and a function of y with respect to y.

You have ##\frac{dy}{dx} =sqrt(-y^2 + C_1) ##

Collect the y terms on one side and the x terms on the other side.

\frac{dy}{\sqrt{-y^2+C_1}}=dx

and integrate: \int{\frac{dy}{\sqrt{-y^2+C_1}}}=\int{dx}

You get something like ##-\arccos( y/\sqrt{C_1})=x+C_2##
Solve for y.

ehild
Thank you so much! The book's solution makes soo much more sense now...I'm on my phone now but I'll try to formulate a final solution once I'm off campus :)
 
  • #20
Ok, I am getting something slightly different for my integral, but my trig sub skills are a bit rusty, here is what I did:
\int \frac{dy}{sqrt(C_1-y^2)}
a = sqrt(C_1)
y = sqrt(C_1)Sinb
sqrt(C_1 - y^2) = sqrt(C_1)cosb
dy = sqrt(C_1)Cosb
= \int \frac{sqrt(C_1)Cosb db}{sqrt(C_1)Cosb}
= \int db
b = arccos(\frac{sqrt(C_1 - y^2)}{sqrt(C_1))}
So then I would solve for Y in this equation:
arccos('') = x + C_2 ?
 
Last edited:
  • #21
_N3WTON_ said:
Ok, I am getting something slightly different for my integral, but my trig sub skills are a bit rusty, here is what I did:
\int \frac{dy}{sqrt(C_1-y^2)}
a = sqrt(C_1)
y = sqrt(C_1)Sinb
sqrt(C_1 - y^2) = sqrt(C_1)cosb
dy = sqrt(C_1)Cosb

the following is wrong. You state that
dy = \int \frac{sqrt(C_1)Cosb db}{sqrt(C_1)Cosb}

You seem to forget that you wanted to simplify the integral on the left of
\int{\frac{dy}{\sqrt{-y^2+C_1}}}=\int{dx}, which becomes
\int \frac{sqrt(C_1)Cosb db}{sqrt(C_1)Cosb} = \int db =b
that is,
b=x+C_2

_N3WTON_ said:
b = arccos(\frac{sqrt(C_1 - y^2)}{sqrt(C_1))}

No, that is wrong. b was defined with y =\sqrt{C_1}\sin(b)
So b=\arcsin(\frac{y}{\sqrt{C_1}})You have to solve the equation
\arcsin(\frac{y}{\sqrt{C_1}})=x+C_2
for y.
 
  • #22
ehild said:
the following is wrong. You state that
dy = \int \frac{sqrt(C_1)Cosb db}{sqrt(C_1)Cosb}

You seem to forget that you wanted to simplify the integral on the left of
\int{\frac{dy}{\sqrt{-y^2+C_1}}}=\int{dx}, which becomes
\int \frac{sqrt(C_1)Cosb db}{sqrt(C_1)Cosb} = \int db =b
that is,
b=x+C_2
No, that is wrong. b was defined with y =\sqrt{C_1}\sin(b)
So b=\arcsin(\frac{y}{\sqrt{C_1}})You have to solve the equation
\arcsin(\frac{y}{\sqrt{C_1}})=x+C_2
for y.
Ok, I see where I went wrong, thanks again, as usual your insights have been extremely helpful :)
 
Back
Top