- #1
Thorra
- 45
- 0
Here is another problem I should understand of differential approximation. Maybe I shouldn't have posted it before solving the first one but I'm really anxious to learn them so I can pass the class.
Problem II
Using the Taylor series and the undetermined coefficient method, approximate the derivative $$\frac{d^2 u}{dx^2}$$ with the second order of local approximation in the right-end side of the model, on a homogeneous grid with the step $p $.
My take
Right...
So.
$$v(x-p)=v(x)-p^{'}(x)+\frac{p^2}{2}v^{''}(x)-\frac{p^3}{6}p^3v^{'''}(x)+O(p^4) / \cdot 1$$
$$v(x-2p)=v(x)-2pv^{'}+\frac{4p^2}{2}v^{''}-\frac{8p^3}{6}p^3 v^{'''}(x)+O(16p^4) / \cdot A$$
$$v(x-3p)=v(x)-3pv^{'}+\frac{9p^2}{2}v^{''}-\frac{27p^3}{6}p^3 v^{'''}(x)+O(81p^4) / \cdot B$$
Those be my 3 points, not counting the original one without the time step.
So I add them all up with the new coefficients:
$$v(x-p) + Av(x-2p) + Bv(x-3p) = (1+A+B)v(x) - (1+2A+3B)pv^{'}(x) + p^2 \left(\frac{1}{2}+\frac{4A}{2}+\frac{9B}{2}\right)v^{''}(x) - p^3 \left(\frac{1}{6}+\frac{8A}{6}+\frac{27B}{6}\right)v^{'''}(x)$$
And for some reason (dunno why, I had a lot of help with this one already though) the $v^{'}(x)$ and $v^{'''}(x)$ equal $0$ and so I can figure out the coefficients from the small system:
$$\begin{cases}1+2A+3B= &\mbox{0},\\ \frac{1}{6}+\frac{8A}{6}+\frac{27B}{6}= &\mbox{0} \end{cases}]$$
And I get that $A=-\frac{4}{5}$ and $B=\frac{1}{5}$.
So I put it all in the summed equation and I get:
$$v(x-p)-\frac{4}{5}v(x-2p)+\frac{1}{5}v(x-3p)=\frac{2}{5}v(x) - \frac{3}{5}p^2 v^{''}(x)$$
And get...
$$v^{''}(x)=\frac{5}{-3p^2}\left(v(x-p)-\frac{4}{5}v(x-2p)+\frac{1}{5}v(x-3p)-\frac{2}{5}v(x)\right)+O(p^2)$$
So... Is this it? Could this be correct? Also I'm not sure why cross out the first and third derivatives and how this makes for 2nd approximation. And so.. this is the right point's $v(x)$ approximation? How would a "central" approximation look like? And ehm... what if I didn't go backwards but rather forward my step x+h? A coursemate told me that it's a longabout way to it.Well anyways... thanks for any replies as always.
Edit: lol, made some dumb errors in my expression yesterday again. And here I thought I was *really* getting it right this time. Anyway, how's it lookin'?
Problem II
Using the Taylor series and the undetermined coefficient method, approximate the derivative $$\frac{d^2 u}{dx^2}$$ with the second order of local approximation in the right-end side of the model, on a homogeneous grid with the step $p $.
My take
Right...
So.
$$v(x-p)=v(x)-p^{'}(x)+\frac{p^2}{2}v^{''}(x)-\frac{p^3}{6}p^3v^{'''}(x)+O(p^4) / \cdot 1$$
$$v(x-2p)=v(x)-2pv^{'}+\frac{4p^2}{2}v^{''}-\frac{8p^3}{6}p^3 v^{'''}(x)+O(16p^4) / \cdot A$$
$$v(x-3p)=v(x)-3pv^{'}+\frac{9p^2}{2}v^{''}-\frac{27p^3}{6}p^3 v^{'''}(x)+O(81p^4) / \cdot B$$
Those be my 3 points, not counting the original one without the time step.
So I add them all up with the new coefficients:
$$v(x-p) + Av(x-2p) + Bv(x-3p) = (1+A+B)v(x) - (1+2A+3B)pv^{'}(x) + p^2 \left(\frac{1}{2}+\frac{4A}{2}+\frac{9B}{2}\right)v^{''}(x) - p^3 \left(\frac{1}{6}+\frac{8A}{6}+\frac{27B}{6}\right)v^{'''}(x)$$
And for some reason (dunno why, I had a lot of help with this one already though) the $v^{'}(x)$ and $v^{'''}(x)$ equal $0$ and so I can figure out the coefficients from the small system:
$$\begin{cases}1+2A+3B= &\mbox{0},\\ \frac{1}{6}+\frac{8A}{6}+\frac{27B}{6}= &\mbox{0} \end{cases}]$$
And I get that $A=-\frac{4}{5}$ and $B=\frac{1}{5}$.
So I put it all in the summed equation and I get:
$$v(x-p)-\frac{4}{5}v(x-2p)+\frac{1}{5}v(x-3p)=\frac{2}{5}v(x) - \frac{3}{5}p^2 v^{''}(x)$$
And get...
$$v^{''}(x)=\frac{5}{-3p^2}\left(v(x-p)-\frac{4}{5}v(x-2p)+\frac{1}{5}v(x-3p)-\frac{2}{5}v(x)\right)+O(p^2)$$
So... Is this it? Could this be correct? Also I'm not sure why cross out the first and third derivatives and how this makes for 2nd approximation. And so.. this is the right point's $v(x)$ approximation? How would a "central" approximation look like? And ehm... what if I didn't go backwards but rather forward my step x+h? A coursemate told me that it's a longabout way to it.Well anyways... thanks for any replies as always.
Edit: lol, made some dumb errors in my expression yesterday again. And here I thought I was *really* getting it right this time. Anyway, how's it lookin'?
Last edited: