Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Using the Collocation Method to find a Three-Parameter Solution with Trig Functions

  1. Sep 18, 2011 #1
    1. The problem statement, all variables and given/known data
    Determine a three-parameter solution, with trigonometric functions using collocation at x=1/4,1/2, and 3/4.

    Given: [tex]u=\phi_0 + c_1\phi_1 + c_2\phi_2 + c_3\phi_3[/tex]

    [tex]\phi_0=0, \phi_1=sin\pi x, \phi_2=sin2\pi x, \phi_3=sin3\pi x[/tex]

    2. Relevant equations
    [tex]R=-\frac{d^2u}{dx^2}-cos(\pi x)=\Sigma_{i=1}^n c_i(i\pi)^2sin(i\pi x)-cos(\pi x)[/tex]

    3. The attempt at a solution
    So what I basically do here is substitute the three different values for x into
    [tex]R=\Sigma_{i=1}^n c_i(i\pi)^2sin(i\pi x)-cos(\pi x)[/tex]
    for i=1,2,3

    [tex]0=R(x=1/4)=\Sigma_{i=1}^n c_i(i\pi)^2sin(\frac{i\pi}{4})-cos(\frac{\pi}{4})[/tex]
    [tex]0=c_1(\pi)^2sin\frac{\pi}{4}+c_2(2\pi)^2sin\frac{ \pi}{2}+c_3(3\pi)^2sin\frac{3\pi}{4}-cos\frac{\pi}{4}[/tex]
    [tex]0=c_1\pi^2 \frac{\sqrt{2}}{2} + c_2(2\pi)^2 + c_3(3\pi)^2\frac{\sqrt{2}}{2}-\frac{\sqrt{2}}{2}[/tex]

    [tex]0=R(x=1/2)=\Sigma_{i=1}^n c_i(i\pi)^2sin(\frac{i\pi}{2})-cos(\frac{\pi}{2})[/tex]
    [tex]0=c_1(\pi)^2sin\frac{\pi}{2}+c_2(2\pi)^2sin \pi+c_3(3\pi)^2sin\frac{3\pi}{2}-cos\frac{\pi}{2}[/tex]
    [tex]0=c_1\pi^2 + c_2(0) + c_3(3\pi)^2-(0)[/tex]

    [tex]0=R(x=3/4)=\Sigma_{i=1}^n c_i(i\pi)^2sin(\frac{3i\pi}{4})-cos(\frac{3\pi}{4})[/tex]
    [tex]0=c_1\pi^2 \frac{\sqrt{2}}{2} - c_2(2\pi)^2 + c_3(3\pi)^2\frac{\sqrt{2}}{2}+\frac{\sqrt{2}}{2}[/tex]

    Putting the coefficients into a 3X3 matrix and solving for the constants,

    [tex]c_1=0, c_2=\frac{\sqrt{2}\pi^2}{8}, c_3=0[/tex]

    so finally

    [tex]u=\frac{\sqrt{2}\pi^2}{8}sin(2\pi x)[/tex]

    I checked with the answers in the book and these are correct. What I need to do now is compare this against the solution of
    [tex]u_0=\pi^{-2}(cos\pi x +2x -1)[/tex]

    I let x=1/4 and solved each of the equations


    Is this correct? Does this just mean that the collocation method does not produce a good enough approximation?
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?