System of two second order ODE's. Solution does not agree with Wolfram.

In summary, the student attempted to solve the system of equations but failed to match Wolfram Alpha's result.
  • #1
2sin54
109
1

Homework Statement


Solve the following system of differential equations:

##y''(x) = y'(x) + z'(x) - z(x)##
##z''(x) = -5*y'(x) - z'(x) -4*y(x) + z(x)##

2. The attempt at a solution

I converted the two second order equations to 4 first order equations by substituting:
##g(x) = y'(x)## and ##h(x) = z'(x)##

So now I have the following system of equations:

##g' = g + h - z##
##h' = -5g - h - 4y + z##
##y' = g##
##z' = h##

I wrote the system in matrix form, solved the characteristic equation for 4 eigenvalues and got
λ1 = ##1##
λ2 = ##-1##
λ3 = ##2i##
λ4 = ##-2i##

So the eigenvectors are as follows:

V1 = ##(-1,9,-1,9)##
V2 = ##(-1,1,1,-1)##
V3 = ##(1,2i,-i/2,1)##
V4 = ##(1,-2i,i/2,1)##

So then

X1 = ##exp(x)##V1
X2 = ##exp(-x)##V2
X3 = ##(cos2x+i*sin2x)##V3
X4 = ##(cos2x-i*sin2x)##V4

Skipping some steps (separating complex and real parts of the matrices)

I get that the general solution is (in matrix form):

ϒ = C1*X1 + C2*X2 + C3*X3 + C4*X4

Now, since I need the solution just to the last two functions ( ##y(x)## and ##z(x)## )

I multiply out the last two rows of the matrices and get:

##y(x) = -C_1exp(x) + C_2exp(-x) + (C_3/2)sin2x-(C_4/2)cos2x + (C_5/2)sin2x + (C_6/2)cos2x##

I am not too sure how to proceed further because if I group some arbitrary constants together (near sines and cosines), these constants will not match with the constants in the solution for function Z(x). Nevertheless, ##y(x)## appears to not agree with WolframAlpha:

http://www.wolframalpha.com/input/?i=system of equations&a=*C.system of equations-_*Calculator.dflt-&a=FSelect_**SolveSystemOf2EquationsCalculator--&f3=y''(x)=y'(x)+z'(x)-z(x)&f=SolveSystemOf4EquationsCalculator.equation1_y''(x)=y'(x)+z'(x)-z(x)&f4= z''(x)=-5*y'(x)-z'(x)-4*y(x)+z(x)&f=SolveSystemOf4EquationsCalculator.equation2_ z''(x)=-5*y'(x)-z'(x)-4*y(x)+z(x)&f5=&f=SolveSystemOf4EquationsCalculator.equation3_&f6=&f=SolveSystemOf4EquationsCalculator.equation4_I can't seem to find a mistake. Can anyone help me?
 
Physics news on Phys.org
  • #2
Nice problem… good review for me. It sounds like your method is correct, so it's probably just algebra and sign mistakes. I'm not sure what your ##c_5## and ##c_6## are, however.

One thing I learned is that if you calculate ##\vec{v}_3 e^{2it}##, the real and imaginary parts give you the two independent solutions for the complex roots. That saves doing a bit of algebra, and I think it'll help you avoid whatever error you made. This is the solution I ended up with (with ##x## replaced by ##t##):
$$\begin{bmatrix} g \\ h \\ y \\ z\end{bmatrix} =
c_1 \begin{bmatrix} -1 \\ 9 \\ -1 \\ 9 \end{bmatrix} e^t +
c_2 \begin{bmatrix} -1 \\ 1 \\ 1 \\ -1 \end{bmatrix} e^{-t} +
c_3 \begin{bmatrix} \cos 2t \\ -2 \sin 2t \\ \frac 12 \sin 2t \\ \cos 2t \end{bmatrix} +
c_4 \begin{bmatrix} \sin 2t \\ 2 \cos 2t \\ -\frac 12 \cos 2t \\ \sin 2t \end{bmatrix}.$$ The results from Wolfram Alpha are kind of a pain to compare to because they're not simplified. I did verify the solution I got in Mathematica.
 
Last edited:
  • #3
Alright. So if I understand you correctly the real parts and the complex parts of

X3 = ##(cos2x+i*sin2x)##V3
X4 = ##(cos2x-i*sin2x)##V4

are linearly dependant matrices so I can eliminate one real and one complex part? That does makes sense.
 
Last edited:
  • #4
Yes, though I wouldn't say you're eliminating anything. You're just rearranging terms and combining constants. ##\vec{x}_3## and ##\vec{x}_4## are complex conjugates, so each component of ##c_3 \vec{x}_3 + c_4 \vec{x}_4## is of the form ##c_3 (p+iq) + c_4 (p-iq) = (c_3+c_4) p + i(c_3-c_4)q##.
 
  • #5
vela said:
Yes, though I wouldn't say you're eliminating anything. You're just rearranging terms and combining constants. ##\vec{x}_3## and ##\vec{x}_4## are complex conjugates, so each component of ##c_3 \vec{x}_3 + c_4 \vec{x}_4## is of the form ##c_3 (p+iq) + c_4 (p-iq) = (c_3+c_4) p + i(c_3-c_4)q##.
Thanks for clearing things up.
 

Related to System of two second order ODE's. Solution does not agree with Wolfram.

1. Why does the solution for a system of two second order ODE's sometimes not agree with Wolfram?

There could be a few reasons for this. One possibility is that there is an error in the code or input used on Wolfram. Another possibility is that the system of equations may be too complex for Wolfram to solve accurately. Additionally, the solution may depend on initial conditions or parameters that were not specified in the Wolfram input.

2. How can I check if the solution for a system of two second order ODE's is correct?

You can check the solution by plugging it back into the original system of equations and seeing if it satisfies all the equations. You can also compare it to other known solutions or use numerical methods to approximate the solution and compare it to the Wolfram solution.

3. Can I use Wolfram to solve any type of system of two second order ODE's?

Wolfram can solve many types of systems of ODE's, but it may not be able to solve every type. It is always a good idea to double check the solution and make sure it makes sense in the context of the problem.

4. What should I do if the solution for a system of two second order ODE's does not make sense?

If the solution does not make sense, there may be an error in the system of equations or in the input used on Wolfram. You can try checking your work and input, or seeking help from a colleague or professor.

5. Why is it important to verify the solution for a system of two second order ODE's?

Verifying the solution is important because it ensures the accuracy and validity of the solution. Mistakes in solving the system of equations or in using Wolfram can lead to incorrect solutions. It is important to catch and correct these mistakes to avoid any potential errors in further analysis or applications of the solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
530
  • Calculus and Beyond Homework Help
Replies
3
Views
608
  • Calculus and Beyond Homework Help
Replies
7
Views
862
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
21
Views
905
  • Calculus and Beyond Homework Help
Replies
1
Views
954
  • Calculus and Beyond Homework Help
Replies
3
Views
610
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
739
Back
Top