Second Order Diff Eq

lookAtree

Homework Statement

Hi everyone, I have the following differential equation that I am trying to solve:

(-1/k$^{2}$)*(d$^{2}$y/dx$^{2}$) - y = (Q*c/P*L)*x

Where Q,c,P,L, and k are constants. The solution ends up being:

y = A*cos(k*x) +B*sin(k*x) -(Q*c/P*L)*x

Where A and B are constants (of integration).

I want to say that there is complex roots involved but even with that I cannot accomplish the desired result.

I can't seem to figure out any uniting steps, any help would be appreciated.

Is there an identity being used?

Homework Helper
Rewrite the equation as

d^2y/dx^2 +k^2 y = (-k^2 Qc/PL)x

or d^2y/dx^2 +k^2 y = Kx

Now this is a 2nd order DE with constant coeffieicents, so your solution will be of the form y = yc + yp where yc is the complementary/homogenous solution and yp is your particular integral.

To get yc, you would solve

d^2y/dx^2 +k^2 y = 0

can you solve this using by forming your auxiliary equation?

Homework Helper

Homework Statement

Hi everyone, I have the following differential equation that I am trying to solve:

(-1/k$^{2}$)*(d$^{2}$y/dx$^{2}$) - y = (Q*c/P*L)*x

Where Q,c,P,L, and k are constants. The solution ends up being:

y = A*cos(k*x) +B*sin(k*x) -(Q*c/P*L)*x

Where A and B are constants (of integration).

I want to say that there is complex roots involved but even with that I cannot accomplish the desired result.

I can't seem to figure out any uniting steps, any help would be appreciated.

Is there an identity being used?

y = A*cos(k*x) +B*sin(k*x) -(Q*c/P*L)*x is the general solution of your differential equation. What is your problem with it? You need some initial conditions to find the constants A and B, to fit it to some real situation.

ehild

lookAtree
ehild, I am trying to learn the steps to get to the solution "y = A*cos(k*x) +B*sin(k*x) -(Q*c/P*L)*x". I should have mentioned that I haven't had the need to do diff eq's in over 6 years and now I'm learning everything over again to understand a book I'm reading that utilizes equations like these.
rock.freak667, I separated the equation to a particular and general solution; y(x) = yc + yp.

So far I have:

a = -(Qc/Pl) b = -k^2

y'' = ax+by

Auxiliary eq: y'' = b*y

r^2 = b

r = sqrt(b)--> r = sqrt(-k^2) = k*i

Then, y = c1*e^(k*i*x) and since e^(i*A) = cos(A) + i*sin(A) we get

cos(kx)+i*sin(kx) --> A*cos(kx) + B*sin(kx), where B includes the imaginary number?

then do we go directly to the solution? Being:

y = A*sin(kx) +B*sin(kx) -(Qc/Pl)*x

and I have boundary conditions to solve this equation, but it's the process to get to that general solution which is giving me trouble.

Is there a step I'm missing or skipping? Thanks again for helping out.

Last edited:
Homework Helper
rock.freak667, I separated the equation to a particular and general solution; y(x) = yc + yp.

Right, that's the first step.

So far I have:

a = -(Qc/Pl) b = -k^2

y'' = ax+by

I think a = -(Qck^2/PL)

Auxiliary eq: y'' = b*y

r^2 = b

r = sqrt(b)--> r = sqrt(-k^2) = k*i

Then, y = c1*e^(k*i*x) and since e^(i*A) = cos(A) + i*sin(A) we get

cos(kx)+i*sin(kx) --> A*cos(kx) + B*sin(kx), where B includes the imaginary number?

So in this step, once you see that you have complex roots in the form r = λ±μi (i is the imaginary unit), your 'yc' is

yc=eλx[Asin(μx)+Bcos(μx)]

then do we go directly to the solution? Being:

y = A*sin(kx) +B*sin(kx) -(Qc/Pl)*x

and I have boundary conditions to solve this equation, but it's the process to get to that general solution which is giving me trouble.

Is there a step I'm missing or skipping? Thanks again for helping out.

So far you've only found yc, you still need yp

The form of yp depends on the functions on the right side of the DE. Say for example, the right side was 'x2+x', then yp=Dx2+Ex+F (D-F are constants). So in your case, you have the a polynomial whose highest power is 1.

Can you guess what the form of yp would be for that? Once you get that, you will need to sub that back into the DE to get the constants for yp.

You can check here for more information on solving second order DE's

Homework Helper
ehild, I am trying to learn the steps to get to the solution "y = A*cos(k*x) +B*sin(k*x) -(Q*c/P*L)*x". I should have mentioned that I haven't had the need to do diff eq's in over 6 years and now I'm learning everything over again to understand a book I'm reading that utilizes equations like these.
rock.freak667, I separated the equation to a particular and general solution; y(x) = yc + yp.

So far I have:

a = -(Qc/Pl) b = -k^2

y'' = ax+by
https://www.physicsforums.com/showthread.php?p=4055943#post4055943... but shouldn't that be: a=b(Qc/PL)? (ref: post #1) to get y''=ax+by ?

To understand the process of finding the general solution you need to review second order DEs.

Basically it boils down to a lot of guesswork - but we know, from historical attempts, some rules for how to make those guesses for specific classes of DE. ehild has been filling you in on those rules for the specific class where y''=ax+by (which is to say: 2nd order, linear, constant coefficients - polynomial in x on RHS).

The method is to solve y''=by to get part of the general solution - which you use to modify any single particular solution. Together they make the complete general solution.

I suspect you have become too rusty and seriously need to revise the basics.
The good news is that it is like falling off a bicycle.

lookAtree
rock.freak667 I am reviewing that website and will continue on this post once I have a better understanding of second order differential equations. Maybe I jumped in the deep end of the pool not ready for no solid ground to stand on. Simon, your suspicions are correct, I will refer back to these posts and show my progress to you all.