The Student Room Group

Very Difficult Differential Equation

Any help would be much appreciated on this question, I've been stuck on it for hours.

The actual equation uses greek symbols but as I'm not sure how to write these on here I have replaced them using normal alphabet letters.

THE QUESTION
Determine the values of A and c, such that

y(x) = A cos (bx+c)

solves the differential equation (driven and damped harmonic oscillator)

y"+dy'+e^2*y = h cos(bx)

where d>0 and d,e,h and b are constants with some given numerical values.

MY ATTEMPT SO FAR

I have tried solving this by using the second order linear inhomogenous formula and by differentiating and substituting y(x) = A cos (bx+c) into the equation.

Both ended up with long equations that I couldn't simplify.

I'm sure using the standard second order linear inhomogenous differential equation formula is the way to solve it.

Doing this I solved the homogenous part using the quadratic formula to get a complementary solution of

exponential(first root of quadratic) + exponential(second root of quadratic).


Focusing on the RHS I chose the particular integral of the form

C cos(bx) + D sin(bx)

After differentiating this twice and substituting into the LHS of the original equation it comes down to

(e^2-b^2)*C + d*D*b = h......(1)
(e^2-b^2)*D* -d*c*b = 0......(2)

From here I need to (but cannot) find the values of C and D which would then be used in C cos(bx) + D sin(bx).

This would then give me a general solution for the differential equation of

y = exponential(first root of quadratic) + exponential(second root of quadratic) + C cos(bx) + D sin(bx)

Which I would then put equal to A cos (bx+c) and try to solve for A and c.

This will probably get no replies due to the length but if anyone does try it please can you see where I am going/went wrong.

THANK YOU!

Reply 1

Assuming I've understood your equations correctly, I don't really understand what the problem is.

You have:

(e2b2)C+dbD=h(e^2-b^2)C + dbD = h (1)
(e2b2)DdbC=0(e^2-b^2)D -dbC = 0 (2)

so

db(e2b2)C+d2b2D=hdbdb(e^2-b^2)C + d^2b^2D = hdb (multiply (1) by db)
(e2b2)2Ddb(e2b2)C=0(e^2-b^2)^2D-db(e^2-b^2)C = 0 (multiply (2) by e2b2e^2-b^2).

adding these equations gives us

(d2b2+(e2b2)2))D=hdb(d^2b^2+(e^2-b^2)^2))D = hdb
so
D=hdb(d2b2+(e2b2)2))D = \frac{hdb}{(d^2b^2+(e^2-b^2)^2))}

and obviously once you have D it is easy to find C.

Reply 2

Thanks for your help, that enabled me to find the values of C and D and I therefore now have a complementary function and a particular solution.

However when I add these two together to get y and substitute it back into the original differential equation the outcome is

cos(b*x)*h+exp(-1/2*d+1/2*(d^2-4*e^2)^(1/2))*e^2+exp(-1/2*d-1/2*(d^2-4*e^2)^(1/2))*cos^2

I used Maple to compute this as a much quicker way of checking.

I've been over my workings a few times and cannot see where I have gone wrong, also I am unsure how to put this eventual correct value of y equal to A*cos(b*x+c) to solve for the values for A and c.

Reply 3

You must be doing something I'm not understanding, because I don't see where you're getting all those exponentials from.

You only need to find a solution, so you shouldn't be worrying about complementary functions yet - just get a particular solution that works.

So you should really just be looking at y = C cos bx +D sin bx, in which case I don't see where the rest of your "solution" is going to come from. I particularly don't see where the term (exp(-1/2*d-1/2*(d^2-4*e^2)^(1/2))*cos^2) has come from.

Reply 4

I think I don't understand the theory behind it.

I went about the problem trying to find the general solution to the 2nd order linear inhomogeneous differential equation with solution y = complementary function + particular solution.

The exponential part of my solution is coming from the complementary function.

So I'm guessing that to solve this I ignore the complementary function and simply use the particular solution found by using Csin(bx)+Dcos(bx), and then put this equal to y(x) = A cos (bx+c) and solve?

Reply 5

carpmasterjong
I think I don't understand the theory behind it.

I went about the problem trying to find the general solution to the 2nd order linear inhomogeneous differential equation with solution y = complementary function + particular solution.

The exponential part of my solution is coming from the complementary function.

So I'm guessing that to solve this I ignore the complementary function and simply use the particular solution found by using Csin(bx)+Dcos(bx), and then put this equal to y(x) = A cos (bx+c) and solve?
Almost. You want to put it equal to the RHS of the differential equation, hcos(bx)h \cos(bx).

Of course, this will only give you a solution. With a 2nd order differential equation, there are two degrees of freedom (one from each time you integrate when solving the equation from 1st principles - not that anyone ever does solve it from 1st principles!) Typically you use some boundary conditions (e.g. y(0)=1, y'(0)=2) to find the two unknowns. This is where the "complementary function" comes in; it basically gives you two independent solutions of the homogeneous equation that you can use to give the general solution.

In this case, where you're not worrying about boundary conditions, you don't need the general solution, so you don't need to worry much about them. But note that adding the complementary function to your particular solution shouldn't stop the result being a solution to the original (inhomogeneous) equation. So if you've substituted back in and not got hcos(bx)h \cos(bx) for the RHS, then you've made a mistake somewhere.

I'm also assuming you're fully aware that Ccosbx+Dsinbx=Acos(bx+c) C \cos bx + D \sin bx = A \cos(bx+c) for suitable choices of A, c. So you could just try Acos(bx+c) A \cos(bx+c) directly, rather that use Ccosbx+DsinbxC \cos bx + D \sin bx and then rewriting that solution. I'm not sure offhand which approach is easier.

Reply 6

I once again thank you for your help.

I've now got it down to two equations.

1. Found using the particular solution Ccos(bx)+ Dsin(bx) and then using the original equation to calculate C and D. The C and D values I know are correct as they do work when Ccos(bx) + Dsin(bx) is put back into the original equation.

(e^2-b^2)*h*cos(b*x)/(d^2*b^2+e^4-2*e^2*b^2+b^4)+sin(b*x)*h*d*b/(d^2*b^2+(e^2-b^2)^2) = A*cos(bx+c)


2. Found by substituting y(x) = A cos (bx+c) straight into the differential equation.

-A*(cos(b*x+g)*b^2+d*sin(b*x+g)*b-e^2*cos(b*x+g)) = h*cos(bx)

I can't see how to use these equations even simulataneously to find the values of A and c.

Reply 7

carpmasterjong
I once again thank you for your help.

I've now got it down to two equations.

1. Found using the particular solution Ccos(bx)+ Dsin(bx) and then using the original equation to calculate C and D. The C and D values I know are correct as they do work when Ccos(bx) + Dsin(bx) is put back into the original equation.

(e^2-b^2)*h*cos(b*x)/(d^2*b^2+e^4-2*e^2*b^2+b^4)+sin(b*x)*h*d*b/(d^2*b^2+(e^2-b^2)^2) = A*cos(bx+c)I think you're still confused. Let's back right up:

You want to find a particular solution of y"+dy'+e^2*y = h cos(bx). The first bit of confusion I'm seeing is that you seem occasionally to be trying to solve y"+dy'+e^2*y = Acos(bx+c). This is wrong. The only equation you need to be solving is y"+dy'+e^2*y = h cos(bx).

There are two ways of solving the equation.

One way, is to look for a solution of the form y = C cos bx + D sin bx. You will need to pick C,D so the various "sin bx" terms cancel out and the "cos bx" terms sum to h cos bx. Finally, you need to reexpress your solution in the form y = A cos (bx + c) (because that's what the question asks for). Which you should do using standard trig identities - you'll end up with A=C2+D2A = \sqrt{C^2+D^2} and something like c=tan1(D/C)c=\tan^{-1}(D/C) (not saying that last equation is right, but it will be something like that).

You've done something like this in your working for (1), but for some reason you seem to be looking for Acos(bx+c) on the RHS instead of h cos bx.

The other way is to look directly for a solution of the form y = A cos(bx+c) (as the question suggests). This time, it will be by choosing the appropriate value of ''c' that you will get the "cos(bx+c)" and "sin(bx+c)" terms to simplify down to a term in "cos bx" only. And you then choose A to get the right amplitude. This is the route you started on in (2), but you didn't seem to realise the appropriate choice of 'c' will get the LHS looking like cos(bx).

Either of these approaches will work - indeed, they are almost the same approach - the only difference is at what point you combine a pair of {sin,cos} terms to a single cos term. For what it is worth, I would say the first method is slightly easier.

What will cause a lot of confusion is trying to use both approaches simultaneously as you currently seem to be doing.

Reply 8

DFranklin
I think you're still confused. Let's back right up:

You want to find a particular solution of y"+dy'+e^2*y = h cos(bx). The first bit of confusion I'm seeing is that you seem occasionally to be trying to solve y"+dy'+e^2*y = Acos(bx+c). This is wrong. The only equation you need to be solving is y"+dy'+e^2*y = h cos(bx).




The reason why it seems I'm trying to solve the equation equal to Acos(bx+c) is because I had already found a particular solution for the equation

y"+dy'+e^2*y = h cos(bx)

I.e I had found the values of C and D such that y(x) = Ccos(bx) + Dsin(bx) when substituted into y"+dy'+e^2*y gave h cos(bx) as required. Therefore I put y(x) = Acos(bx+C) as I wanted to put it in this form.

Reply 9

So are you happy you have the answer now?

Reply 10

carpmasterjong


THE QUESTION
Determine the values of A and c, such that

y(x) = A cos (bx+c)

solves the differential equation (driven and damped harmonic oscillator)

y"+dy'+e^2*y = h cos(bx)

where d>0 and d,e,h and b are constants with some given numerical values.

MY ATTEMPT SO FAR

I have tried solving this by using the second order linear inhomogenous formula and by differentiating and substituting y(x) = A cos (bx+c) into the equation.

Both ended up with long equations that I couldn't simplify.


I believe that your second method (substituting y into the equation) should work. You also mentioned that d, e, h and b have some given numerical values. Perhaps it would be easier if you can type out the given values.