1
$\begingroup$

I am trying to solve a problem using method of undetermined coefficients to derive a second order scheme for ux using three points, c1, c2, c3 in the following way:

ux = c1*u(x) + c2*u(x - h) + c3*u(x - 2h)

Now second order scheme just means to solve the equation for the second order derivative, am I right?

I understand how this problem works for actual numerical functions, but I am unsure how to go about it when everything is theoretical and just variables.

Thanks for some help

$\endgroup$
1
$\begingroup$

Having a second order scheme means that it's accurate for polynomials up to and including second degree. The scheme should calculate the first order derivative $u_x$, as the formula says.

It suffices to make sure that the scheme is accurate for $1$, $x$, and $x^2$; then it will work for all second-degree polynomials by linearity.

To make it work for the function $u(x)=1$, we need $$ 0= c_1+c_2+c_3 \tag1$$ To make it work for the linear function $u(x)=x$, we need $$ 1 = c_1 x +c_2(x-h) +c_3(x-2h) \tag2$$ which in view of (1) simplifies to $$ 1 = c_2(-h) +c_3(-2h) \tag{2'}$$ And to make it work for the quadratic function $u(x)=x^2$, we need $$ 2x = c_1 x^2 +c_2(x-h)^2 +c_3(x-2h)^2 \tag3$$ which in view of (1) and (2') simplifies to $$ 0 = c_2h^2 +c_3(4h^2) \tag{3'}$$ Now you can solve the linear system (1), (2') and (3') for the unknowns $c_1,c_2,c_3$.


This may not be the quickest solution, but it's the most concrete one that I could think of.

$\endgroup$
  • $\begingroup$ did you miss the u(x), u(x-h), and u(x-2h)? You never showed those in your equation $\endgroup$ – Matt Hintzke Feb 28 '13 at 1:06
  • $\begingroup$ @MattHintzke I worked with three concrete functions: $u(x)=1$, $u(x)=x$, and $u(x)=x^2$. For example, when I work with $u(x)=x^2$, I have $u(x-h)=(x-h)^2$. So I write $c_2(x-h)^2$ in the equation. It's plugging in a formula for the function $u$. $\endgroup$ – user53153 Feb 28 '13 at 1:09
  • $\begingroup$ OHH wow I looked at it wrong haha, thank you I understand now :) $\endgroup$ – Matt Hintzke Feb 28 '13 at 1:11
  • $\begingroup$ in the end should c1, c2, and c3 all be functions of only h? $\endgroup$ – Matt Hintzke Feb 28 '13 at 1:44
  • 1
    $\begingroup$ @MattHintzke Yes, definitely. In any scheme. $\endgroup$ – user53153 Feb 28 '13 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.