Show that Local Truncation Error is not $O(h^3)$ for any choice of constants
$begingroup$
This is one of the exercise questions in the book Numerical Analysis by Richard L.Burden
Show that the difference method
$$y_0 = alpha \
y_{i+1} = y_i + a_1 f(t_i,y_i)+a_2 f(t_i+alpha_2, y_i+delta_2 f(t_i,y_i)$$
for each $i=0,1,2,cdots,N-1$, cannot have local truncation error $mathcal{O}(h^3)$ for any choice of constants $a_1,a_2,alpha_2,$ and $delta_2$
Answer:
Using the notation $y_{i+1}=y(t_{i+1}),y_i = y(t_i), $ and $f_i=f(t_i,y(t_i))$ , and also the definition of the local truncation error we have
$$htau_{i+1}=y_{i+1}-y_i-a_1f_i-a_2f(t_i+alpha_2,y_i+delta_2 f_i))$$
If we expand $y_{i+1}$ and $f(t_i+alpha_2,y_i+delta_2 f_i)$ in Taylor series about $t_i$ and $f(t_i,y_i)$:
$$begin{equation}begin{aligned} htau_{i+1} &= left( y_i+hf_i + frac{h^2}{2}f'_i+frac{h^3}{6}f''_i+cdots right) - y_i - a_1f_i \&- a_2 left( f_i+alpha_2 f_t(t_i,y_i)+delta_2 f_i f_y (t_i,y_i) + alpha_2 delta_2 f_i f_{ty}(t_i,y_i) +frac{alpha^2}{2}f_{tt}(t_i,y_i) \+ frac{delta^2 f_i^2}{2}f_{yy}(t_i,y_i)+cdotsright) \&= (h-a_1-a_2)f_i+ left( frac{h^2}{2}-a_2 alpha_2 right)f_t (t_i,y_i) + left( frac{h^2}{2}-a_2 delta_2 right)f_i f_y (t_i,y_i) \&+left( frac{h^3}{6}-a_2frac{alpha^2}{2} right)f_{tt}(t_i,y_i)+left( frac{h^3}{3}-a_2 alpha_2 delta_2 right)f_i f_{ty} (t_i, y_i) \&+ left( frac{h^3}{6} -a_2 frac{delta_2^2}{2}right)f_i^2 f_{yy} (t_i,y_i)+color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}+cdots
end{aligned}end{equation}$$
I can only expand the equation until the black part, I couldn't get where the red part comes from, and it's the essence to show that the $h^3$ term cannot be cancelled regardless of the choice of the constants $a_1,a_2,alpha_2,delta_2$. The $frac{h^3}{6}$ in the $color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}$ hinting that it comes from the Taylor expansion of $frac{h^3}{6}f_i''$, but when I expand it I only get three terms:
$$frac{h^3}{6}f''_i = frac{h^3}{6} left( f_{tt}+f_{yy}f_i^2+2f_{ty}f_i right)$$
numerical-methods taylor-expansion partial-derivative finite-differences truncation-error
$endgroup$
add a comment |
$begingroup$
This is one of the exercise questions in the book Numerical Analysis by Richard L.Burden
Show that the difference method
$$y_0 = alpha \
y_{i+1} = y_i + a_1 f(t_i,y_i)+a_2 f(t_i+alpha_2, y_i+delta_2 f(t_i,y_i)$$
for each $i=0,1,2,cdots,N-1$, cannot have local truncation error $mathcal{O}(h^3)$ for any choice of constants $a_1,a_2,alpha_2,$ and $delta_2$
Answer:
Using the notation $y_{i+1}=y(t_{i+1}),y_i = y(t_i), $ and $f_i=f(t_i,y(t_i))$ , and also the definition of the local truncation error we have
$$htau_{i+1}=y_{i+1}-y_i-a_1f_i-a_2f(t_i+alpha_2,y_i+delta_2 f_i))$$
If we expand $y_{i+1}$ and $f(t_i+alpha_2,y_i+delta_2 f_i)$ in Taylor series about $t_i$ and $f(t_i,y_i)$:
$$begin{equation}begin{aligned} htau_{i+1} &= left( y_i+hf_i + frac{h^2}{2}f'_i+frac{h^3}{6}f''_i+cdots right) - y_i - a_1f_i \&- a_2 left( f_i+alpha_2 f_t(t_i,y_i)+delta_2 f_i f_y (t_i,y_i) + alpha_2 delta_2 f_i f_{ty}(t_i,y_i) +frac{alpha^2}{2}f_{tt}(t_i,y_i) \+ frac{delta^2 f_i^2}{2}f_{yy}(t_i,y_i)+cdotsright) \&= (h-a_1-a_2)f_i+ left( frac{h^2}{2}-a_2 alpha_2 right)f_t (t_i,y_i) + left( frac{h^2}{2}-a_2 delta_2 right)f_i f_y (t_i,y_i) \&+left( frac{h^3}{6}-a_2frac{alpha^2}{2} right)f_{tt}(t_i,y_i)+left( frac{h^3}{3}-a_2 alpha_2 delta_2 right)f_i f_{ty} (t_i, y_i) \&+ left( frac{h^3}{6} -a_2 frac{delta_2^2}{2}right)f_i^2 f_{yy} (t_i,y_i)+color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}+cdots
end{aligned}end{equation}$$
I can only expand the equation until the black part, I couldn't get where the red part comes from, and it's the essence to show that the $h^3$ term cannot be cancelled regardless of the choice of the constants $a_1,a_2,alpha_2,delta_2$. The $frac{h^3}{6}$ in the $color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}$ hinting that it comes from the Taylor expansion of $frac{h^3}{6}f_i''$, but when I expand it I only get three terms:
$$frac{h^3}{6}f''_i = frac{h^3}{6} left( f_{tt}+f_{yy}f_i^2+2f_{ty}f_i right)$$
numerical-methods taylor-expansion partial-derivative finite-differences truncation-error
$endgroup$
add a comment |
$begingroup$
This is one of the exercise questions in the book Numerical Analysis by Richard L.Burden
Show that the difference method
$$y_0 = alpha \
y_{i+1} = y_i + a_1 f(t_i,y_i)+a_2 f(t_i+alpha_2, y_i+delta_2 f(t_i,y_i)$$
for each $i=0,1,2,cdots,N-1$, cannot have local truncation error $mathcal{O}(h^3)$ for any choice of constants $a_1,a_2,alpha_2,$ and $delta_2$
Answer:
Using the notation $y_{i+1}=y(t_{i+1}),y_i = y(t_i), $ and $f_i=f(t_i,y(t_i))$ , and also the definition of the local truncation error we have
$$htau_{i+1}=y_{i+1}-y_i-a_1f_i-a_2f(t_i+alpha_2,y_i+delta_2 f_i))$$
If we expand $y_{i+1}$ and $f(t_i+alpha_2,y_i+delta_2 f_i)$ in Taylor series about $t_i$ and $f(t_i,y_i)$:
$$begin{equation}begin{aligned} htau_{i+1} &= left( y_i+hf_i + frac{h^2}{2}f'_i+frac{h^3}{6}f''_i+cdots right) - y_i - a_1f_i \&- a_2 left( f_i+alpha_2 f_t(t_i,y_i)+delta_2 f_i f_y (t_i,y_i) + alpha_2 delta_2 f_i f_{ty}(t_i,y_i) +frac{alpha^2}{2}f_{tt}(t_i,y_i) \+ frac{delta^2 f_i^2}{2}f_{yy}(t_i,y_i)+cdotsright) \&= (h-a_1-a_2)f_i+ left( frac{h^2}{2}-a_2 alpha_2 right)f_t (t_i,y_i) + left( frac{h^2}{2}-a_2 delta_2 right)f_i f_y (t_i,y_i) \&+left( frac{h^3}{6}-a_2frac{alpha^2}{2} right)f_{tt}(t_i,y_i)+left( frac{h^3}{3}-a_2 alpha_2 delta_2 right)f_i f_{ty} (t_i, y_i) \&+ left( frac{h^3}{6} -a_2 frac{delta_2^2}{2}right)f_i^2 f_{yy} (t_i,y_i)+color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}+cdots
end{aligned}end{equation}$$
I can only expand the equation until the black part, I couldn't get where the red part comes from, and it's the essence to show that the $h^3$ term cannot be cancelled regardless of the choice of the constants $a_1,a_2,alpha_2,delta_2$. The $frac{h^3}{6}$ in the $color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}$ hinting that it comes from the Taylor expansion of $frac{h^3}{6}f_i''$, but when I expand it I only get three terms:
$$frac{h^3}{6}f''_i = frac{h^3}{6} left( f_{tt}+f_{yy}f_i^2+2f_{ty}f_i right)$$
numerical-methods taylor-expansion partial-derivative finite-differences truncation-error
$endgroup$
This is one of the exercise questions in the book Numerical Analysis by Richard L.Burden
Show that the difference method
$$y_0 = alpha \
y_{i+1} = y_i + a_1 f(t_i,y_i)+a_2 f(t_i+alpha_2, y_i+delta_2 f(t_i,y_i)$$
for each $i=0,1,2,cdots,N-1$, cannot have local truncation error $mathcal{O}(h^3)$ for any choice of constants $a_1,a_2,alpha_2,$ and $delta_2$
Answer:
Using the notation $y_{i+1}=y(t_{i+1}),y_i = y(t_i), $ and $f_i=f(t_i,y(t_i))$ , and also the definition of the local truncation error we have
$$htau_{i+1}=y_{i+1}-y_i-a_1f_i-a_2f(t_i+alpha_2,y_i+delta_2 f_i))$$
If we expand $y_{i+1}$ and $f(t_i+alpha_2,y_i+delta_2 f_i)$ in Taylor series about $t_i$ and $f(t_i,y_i)$:
$$begin{equation}begin{aligned} htau_{i+1} &= left( y_i+hf_i + frac{h^2}{2}f'_i+frac{h^3}{6}f''_i+cdots right) - y_i - a_1f_i \&- a_2 left( f_i+alpha_2 f_t(t_i,y_i)+delta_2 f_i f_y (t_i,y_i) + alpha_2 delta_2 f_i f_{ty}(t_i,y_i) +frac{alpha^2}{2}f_{tt}(t_i,y_i) \+ frac{delta^2 f_i^2}{2}f_{yy}(t_i,y_i)+cdotsright) \&= (h-a_1-a_2)f_i+ left( frac{h^2}{2}-a_2 alpha_2 right)f_t (t_i,y_i) + left( frac{h^2}{2}-a_2 delta_2 right)f_i f_y (t_i,y_i) \&+left( frac{h^3}{6}-a_2frac{alpha^2}{2} right)f_{tt}(t_i,y_i)+left( frac{h^3}{3}-a_2 alpha_2 delta_2 right)f_i f_{ty} (t_i, y_i) \&+ left( frac{h^3}{6} -a_2 frac{delta_2^2}{2}right)f_i^2 f_{yy} (t_i,y_i)+color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}+cdots
end{aligned}end{equation}$$
I can only expand the equation until the black part, I couldn't get where the red part comes from, and it's the essence to show that the $h^3$ term cannot be cancelled regardless of the choice of the constants $a_1,a_2,alpha_2,delta_2$. The $frac{h^3}{6}$ in the $color{red}{frac{h^3}{6}left( f_t (t_i,y_i) f_y (t_i,y_i) + f_i f_y^2 (t_i,y_i) right)}$ hinting that it comes from the Taylor expansion of $frac{h^3}{6}f_i''$, but when I expand it I only get three terms:
$$frac{h^3}{6}f''_i = frac{h^3}{6} left( f_{tt}+f_{yy}f_i^2+2f_{ty}f_i right)$$
numerical-methods taylor-expansion partial-derivative finite-differences truncation-error
numerical-methods taylor-expansion partial-derivative finite-differences truncation-error
asked Dec 30 '18 at 6:41
WeiShan NgWeiShan Ng
617
617
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
$f''$ denotes the second derivative of $f(t, y(t))$ as function in $t$. With $y'(t)=f(t,y(t))$ it computes as
$$
frac{d^2}{dt^2}fbigl(t,y(t)bigr)
=frac{d}{dt}Bigl(f_tbigl(t,y(t)bigr)+f_ybigl(t,y(t)bigr)fbigl(t,y(t)bigr)Bigr)
=f_{tt}+2f_{ty}f+f_{yy}f^2+f_y(f_t+f_yf).
$$
So indeed there are two additional parts more than you expected. They result conceptually from the fact that the offset $y(t+s)-y(t)$ for the Taylor expansion at time $t$ is not constant but itself a function that contributes higher order terms. Directly they result from the application of the product rule to the second term in the first derivative.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3056561%2fshow-that-local-truncation-error-is-not-oh3-for-any-choice-of-constants%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
$f''$ denotes the second derivative of $f(t, y(t))$ as function in $t$. With $y'(t)=f(t,y(t))$ it computes as
$$
frac{d^2}{dt^2}fbigl(t,y(t)bigr)
=frac{d}{dt}Bigl(f_tbigl(t,y(t)bigr)+f_ybigl(t,y(t)bigr)fbigl(t,y(t)bigr)Bigr)
=f_{tt}+2f_{ty}f+f_{yy}f^2+f_y(f_t+f_yf).
$$
So indeed there are two additional parts more than you expected. They result conceptually from the fact that the offset $y(t+s)-y(t)$ for the Taylor expansion at time $t$ is not constant but itself a function that contributes higher order terms. Directly they result from the application of the product rule to the second term in the first derivative.
$endgroup$
add a comment |
$begingroup$
$f''$ denotes the second derivative of $f(t, y(t))$ as function in $t$. With $y'(t)=f(t,y(t))$ it computes as
$$
frac{d^2}{dt^2}fbigl(t,y(t)bigr)
=frac{d}{dt}Bigl(f_tbigl(t,y(t)bigr)+f_ybigl(t,y(t)bigr)fbigl(t,y(t)bigr)Bigr)
=f_{tt}+2f_{ty}f+f_{yy}f^2+f_y(f_t+f_yf).
$$
So indeed there are two additional parts more than you expected. They result conceptually from the fact that the offset $y(t+s)-y(t)$ for the Taylor expansion at time $t$ is not constant but itself a function that contributes higher order terms. Directly they result from the application of the product rule to the second term in the first derivative.
$endgroup$
add a comment |
$begingroup$
$f''$ denotes the second derivative of $f(t, y(t))$ as function in $t$. With $y'(t)=f(t,y(t))$ it computes as
$$
frac{d^2}{dt^2}fbigl(t,y(t)bigr)
=frac{d}{dt}Bigl(f_tbigl(t,y(t)bigr)+f_ybigl(t,y(t)bigr)fbigl(t,y(t)bigr)Bigr)
=f_{tt}+2f_{ty}f+f_{yy}f^2+f_y(f_t+f_yf).
$$
So indeed there are two additional parts more than you expected. They result conceptually from the fact that the offset $y(t+s)-y(t)$ for the Taylor expansion at time $t$ is not constant but itself a function that contributes higher order terms. Directly they result from the application of the product rule to the second term in the first derivative.
$endgroup$
$f''$ denotes the second derivative of $f(t, y(t))$ as function in $t$. With $y'(t)=f(t,y(t))$ it computes as
$$
frac{d^2}{dt^2}fbigl(t,y(t)bigr)
=frac{d}{dt}Bigl(f_tbigl(t,y(t)bigr)+f_ybigl(t,y(t)bigr)fbigl(t,y(t)bigr)Bigr)
=f_{tt}+2f_{ty}f+f_{yy}f^2+f_y(f_t+f_yf).
$$
So indeed there are two additional parts more than you expected. They result conceptually from the fact that the offset $y(t+s)-y(t)$ for the Taylor expansion at time $t$ is not constant but itself a function that contributes higher order terms. Directly they result from the application of the product rule to the second term in the first derivative.
answered Dec 30 '18 at 11:39
LutzLLutzL
59.8k42057
59.8k42057
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3056561%2fshow-that-local-truncation-error-is-not-oh3-for-any-choice-of-constants%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown