Problems involving the second Taylor Polynomial of $e^xcos x$
$begingroup$
I'm working on what seem to be very easy problems, but my answers aren't matching my textbook's.
1) Find the second Taylor polynomial of $f(x) = e^xcos x$ about $x_0 = 0$.
$P_2(x) = 1+x$. (correct)
2) Use $P_2(.5)$ to approximate $f(.5)$. Find an upper bound for the error $|f(.5)-P_2(.5)|$ and compare it to the actual answer.
The error can be no greater than $R_2(.5) = frac{e^.5(sin(.5)+cos(.5))}{24}=.0932$, the actual error is $.0531$. (correct)
Here is where my trouble starts:
3) Find a bound for the error $|f(x)-P_2(x)|$ in using $P_2(x)$ to approximate $f(x)$ on the interval $[0,1]$.
I've tried integrating the error function, which for this problem is $R_2(x) = dfrac{-2e^xi(sin(xi)+cos(xi)x^3}{6}$, from $0$ to $1$. I used the fact that the maximum value of $sin(xi)+cos(xi)=sqrt{2}$, with $xi = pi/4$, but this gave me an incorrect answer.
Any help appreciated.
numerical-methods
$endgroup$
add a comment |
$begingroup$
I'm working on what seem to be very easy problems, but my answers aren't matching my textbook's.
1) Find the second Taylor polynomial of $f(x) = e^xcos x$ about $x_0 = 0$.
$P_2(x) = 1+x$. (correct)
2) Use $P_2(.5)$ to approximate $f(.5)$. Find an upper bound for the error $|f(.5)-P_2(.5)|$ and compare it to the actual answer.
The error can be no greater than $R_2(.5) = frac{e^.5(sin(.5)+cos(.5))}{24}=.0932$, the actual error is $.0531$. (correct)
Here is where my trouble starts:
3) Find a bound for the error $|f(x)-P_2(x)|$ in using $P_2(x)$ to approximate $f(x)$ on the interval $[0,1]$.
I've tried integrating the error function, which for this problem is $R_2(x) = dfrac{-2e^xi(sin(xi)+cos(xi)x^3}{6}$, from $0$ to $1$. I used the fact that the maximum value of $sin(xi)+cos(xi)=sqrt{2}$, with $xi = pi/4$, but this gave me an incorrect answer.
Any help appreciated.
numerical-methods
$endgroup$
add a comment |
$begingroup$
I'm working on what seem to be very easy problems, but my answers aren't matching my textbook's.
1) Find the second Taylor polynomial of $f(x) = e^xcos x$ about $x_0 = 0$.
$P_2(x) = 1+x$. (correct)
2) Use $P_2(.5)$ to approximate $f(.5)$. Find an upper bound for the error $|f(.5)-P_2(.5)|$ and compare it to the actual answer.
The error can be no greater than $R_2(.5) = frac{e^.5(sin(.5)+cos(.5))}{24}=.0932$, the actual error is $.0531$. (correct)
Here is where my trouble starts:
3) Find a bound for the error $|f(x)-P_2(x)|$ in using $P_2(x)$ to approximate $f(x)$ on the interval $[0,1]$.
I've tried integrating the error function, which for this problem is $R_2(x) = dfrac{-2e^xi(sin(xi)+cos(xi)x^3}{6}$, from $0$ to $1$. I used the fact that the maximum value of $sin(xi)+cos(xi)=sqrt{2}$, with $xi = pi/4$, but this gave me an incorrect answer.
Any help appreciated.
numerical-methods
$endgroup$
I'm working on what seem to be very easy problems, but my answers aren't matching my textbook's.
1) Find the second Taylor polynomial of $f(x) = e^xcos x$ about $x_0 = 0$.
$P_2(x) = 1+x$. (correct)
2) Use $P_2(.5)$ to approximate $f(.5)$. Find an upper bound for the error $|f(.5)-P_2(.5)|$ and compare it to the actual answer.
The error can be no greater than $R_2(.5) = frac{e^.5(sin(.5)+cos(.5))}{24}=.0932$, the actual error is $.0531$. (correct)
Here is where my trouble starts:
3) Find a bound for the error $|f(x)-P_2(x)|$ in using $P_2(x)$ to approximate $f(x)$ on the interval $[0,1]$.
I've tried integrating the error function, which for this problem is $R_2(x) = dfrac{-2e^xi(sin(xi)+cos(xi)x^3}{6}$, from $0$ to $1$. I used the fact that the maximum value of $sin(xi)+cos(xi)=sqrt{2}$, with $xi = pi/4$, but this gave me an incorrect answer.
Any help appreciated.
numerical-methods
numerical-methods
edited Jan 13 at 19:34
Bernard
124k742117
124k742117
asked Jan 13 at 18:36
mXdXmXdX
1168
1168
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
I've tried integrating the error function
This isn't helpful. What we're looking for is an upper bound for the error - a largest possible value, not an integral. I would use that maximum for $sin+cos$; multiply it by the maximum for the exponential, and we have an upper bound for the relavant derivative. But then, we're not going to integrate anything.
$endgroup$
$begingroup$
When I do this, I get ~1.281, but my textbook gives an answer of ~1.252. I'm not sure if I did something wrong or if it's a typo.
$endgroup$
– mXdX
Jan 13 at 19:12
1
$begingroup$
The problem says to find a bound. It does not say to find the best possible bound. You don't need to exactly match the answer to be right.
$endgroup$
– jmerry
Jan 13 at 19:15
1
$begingroup$
In more detail on that last comment: the $sin+cos$ has a maximum inside the interval, while the exponential keeps increasing to the end. Because they don't line up in the same place, the maximum of the product appears somewhere between, with a value less than the product of the maximums. We could find it exactly, but it's a lot of effort for not much gain.
$endgroup$
– jmerry
Jan 13 at 19:33
$begingroup$
I see. So we're taking the maximum of the exponential and the maximum of sinx+cosx at the the same time, even though their maximums don't occur at the same time. However, it still gives us some bound, even though there are smaller upper bounds. Right?
$endgroup$
– mXdX
Jan 13 at 19:52
1
$begingroup$
Yes, that's it.
$endgroup$
– jmerry
Jan 13 at 19:57
add a comment |
$begingroup$
hint
$$f(x)=P_2(x)+frac{x^3}{6}f'''(xi)$$
with
$$f'''(xi)=-2(cos(xi)+sin(xi))e^{xi}$$
$$=-2sqrt{2}cos(xi-frac{pi}{4})e^xi$$
thus
$$|f(x)-P_2(x)|le frac{sqrt{2}}{3}e$$
$endgroup$
$begingroup$
I have this already, I'm not sure where to go from here.
$endgroup$
– mXdX
Jan 13 at 18:55
$begingroup$
@mXdX Is it good now.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:00
$begingroup$
Is this for (3)?
$endgroup$
– mXdX
Jan 13 at 19:01
$begingroup$
@mXdX Now, it is for 3.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:05
$begingroup$
This answer is ~1.281, my textbook says the answer is 1.252. Do you think it's a typo?
$endgroup$
– mXdX
Jan 13 at 19:08
add a comment |
Your Answer
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%2f3072371%2fproblems-involving-the-second-taylor-polynomial-of-ex-cos-x%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I've tried integrating the error function
This isn't helpful. What we're looking for is an upper bound for the error - a largest possible value, not an integral. I would use that maximum for $sin+cos$; multiply it by the maximum for the exponential, and we have an upper bound for the relavant derivative. But then, we're not going to integrate anything.
$endgroup$
$begingroup$
When I do this, I get ~1.281, but my textbook gives an answer of ~1.252. I'm not sure if I did something wrong or if it's a typo.
$endgroup$
– mXdX
Jan 13 at 19:12
1
$begingroup$
The problem says to find a bound. It does not say to find the best possible bound. You don't need to exactly match the answer to be right.
$endgroup$
– jmerry
Jan 13 at 19:15
1
$begingroup$
In more detail on that last comment: the $sin+cos$ has a maximum inside the interval, while the exponential keeps increasing to the end. Because they don't line up in the same place, the maximum of the product appears somewhere between, with a value less than the product of the maximums. We could find it exactly, but it's a lot of effort for not much gain.
$endgroup$
– jmerry
Jan 13 at 19:33
$begingroup$
I see. So we're taking the maximum of the exponential and the maximum of sinx+cosx at the the same time, even though their maximums don't occur at the same time. However, it still gives us some bound, even though there are smaller upper bounds. Right?
$endgroup$
– mXdX
Jan 13 at 19:52
1
$begingroup$
Yes, that's it.
$endgroup$
– jmerry
Jan 13 at 19:57
add a comment |
$begingroup$
I've tried integrating the error function
This isn't helpful. What we're looking for is an upper bound for the error - a largest possible value, not an integral. I would use that maximum for $sin+cos$; multiply it by the maximum for the exponential, and we have an upper bound for the relavant derivative. But then, we're not going to integrate anything.
$endgroup$
$begingroup$
When I do this, I get ~1.281, but my textbook gives an answer of ~1.252. I'm not sure if I did something wrong or if it's a typo.
$endgroup$
– mXdX
Jan 13 at 19:12
1
$begingroup$
The problem says to find a bound. It does not say to find the best possible bound. You don't need to exactly match the answer to be right.
$endgroup$
– jmerry
Jan 13 at 19:15
1
$begingroup$
In more detail on that last comment: the $sin+cos$ has a maximum inside the interval, while the exponential keeps increasing to the end. Because they don't line up in the same place, the maximum of the product appears somewhere between, with a value less than the product of the maximums. We could find it exactly, but it's a lot of effort for not much gain.
$endgroup$
– jmerry
Jan 13 at 19:33
$begingroup$
I see. So we're taking the maximum of the exponential and the maximum of sinx+cosx at the the same time, even though their maximums don't occur at the same time. However, it still gives us some bound, even though there are smaller upper bounds. Right?
$endgroup$
– mXdX
Jan 13 at 19:52
1
$begingroup$
Yes, that's it.
$endgroup$
– jmerry
Jan 13 at 19:57
add a comment |
$begingroup$
I've tried integrating the error function
This isn't helpful. What we're looking for is an upper bound for the error - a largest possible value, not an integral. I would use that maximum for $sin+cos$; multiply it by the maximum for the exponential, and we have an upper bound for the relavant derivative. But then, we're not going to integrate anything.
$endgroup$
I've tried integrating the error function
This isn't helpful. What we're looking for is an upper bound for the error - a largest possible value, not an integral. I would use that maximum for $sin+cos$; multiply it by the maximum for the exponential, and we have an upper bound for the relavant derivative. But then, we're not going to integrate anything.
answered Jan 13 at 19:02
jmerryjmerry
17k11633
17k11633
$begingroup$
When I do this, I get ~1.281, but my textbook gives an answer of ~1.252. I'm not sure if I did something wrong or if it's a typo.
$endgroup$
– mXdX
Jan 13 at 19:12
1
$begingroup$
The problem says to find a bound. It does not say to find the best possible bound. You don't need to exactly match the answer to be right.
$endgroup$
– jmerry
Jan 13 at 19:15
1
$begingroup$
In more detail on that last comment: the $sin+cos$ has a maximum inside the interval, while the exponential keeps increasing to the end. Because they don't line up in the same place, the maximum of the product appears somewhere between, with a value less than the product of the maximums. We could find it exactly, but it's a lot of effort for not much gain.
$endgroup$
– jmerry
Jan 13 at 19:33
$begingroup$
I see. So we're taking the maximum of the exponential and the maximum of sinx+cosx at the the same time, even though their maximums don't occur at the same time. However, it still gives us some bound, even though there are smaller upper bounds. Right?
$endgroup$
– mXdX
Jan 13 at 19:52
1
$begingroup$
Yes, that's it.
$endgroup$
– jmerry
Jan 13 at 19:57
add a comment |
$begingroup$
When I do this, I get ~1.281, but my textbook gives an answer of ~1.252. I'm not sure if I did something wrong or if it's a typo.
$endgroup$
– mXdX
Jan 13 at 19:12
1
$begingroup$
The problem says to find a bound. It does not say to find the best possible bound. You don't need to exactly match the answer to be right.
$endgroup$
– jmerry
Jan 13 at 19:15
1
$begingroup$
In more detail on that last comment: the $sin+cos$ has a maximum inside the interval, while the exponential keeps increasing to the end. Because they don't line up in the same place, the maximum of the product appears somewhere between, with a value less than the product of the maximums. We could find it exactly, but it's a lot of effort for not much gain.
$endgroup$
– jmerry
Jan 13 at 19:33
$begingroup$
I see. So we're taking the maximum of the exponential and the maximum of sinx+cosx at the the same time, even though their maximums don't occur at the same time. However, it still gives us some bound, even though there are smaller upper bounds. Right?
$endgroup$
– mXdX
Jan 13 at 19:52
1
$begingroup$
Yes, that's it.
$endgroup$
– jmerry
Jan 13 at 19:57
$begingroup$
When I do this, I get ~1.281, but my textbook gives an answer of ~1.252. I'm not sure if I did something wrong or if it's a typo.
$endgroup$
– mXdX
Jan 13 at 19:12
$begingroup$
When I do this, I get ~1.281, but my textbook gives an answer of ~1.252. I'm not sure if I did something wrong or if it's a typo.
$endgroup$
– mXdX
Jan 13 at 19:12
1
1
$begingroup$
The problem says to find a bound. It does not say to find the best possible bound. You don't need to exactly match the answer to be right.
$endgroup$
– jmerry
Jan 13 at 19:15
$begingroup$
The problem says to find a bound. It does not say to find the best possible bound. You don't need to exactly match the answer to be right.
$endgroup$
– jmerry
Jan 13 at 19:15
1
1
$begingroup$
In more detail on that last comment: the $sin+cos$ has a maximum inside the interval, while the exponential keeps increasing to the end. Because they don't line up in the same place, the maximum of the product appears somewhere between, with a value less than the product of the maximums. We could find it exactly, but it's a lot of effort for not much gain.
$endgroup$
– jmerry
Jan 13 at 19:33
$begingroup$
In more detail on that last comment: the $sin+cos$ has a maximum inside the interval, while the exponential keeps increasing to the end. Because they don't line up in the same place, the maximum of the product appears somewhere between, with a value less than the product of the maximums. We could find it exactly, but it's a lot of effort for not much gain.
$endgroup$
– jmerry
Jan 13 at 19:33
$begingroup$
I see. So we're taking the maximum of the exponential and the maximum of sinx+cosx at the the same time, even though their maximums don't occur at the same time. However, it still gives us some bound, even though there are smaller upper bounds. Right?
$endgroup$
– mXdX
Jan 13 at 19:52
$begingroup$
I see. So we're taking the maximum of the exponential and the maximum of sinx+cosx at the the same time, even though their maximums don't occur at the same time. However, it still gives us some bound, even though there are smaller upper bounds. Right?
$endgroup$
– mXdX
Jan 13 at 19:52
1
1
$begingroup$
Yes, that's it.
$endgroup$
– jmerry
Jan 13 at 19:57
$begingroup$
Yes, that's it.
$endgroup$
– jmerry
Jan 13 at 19:57
add a comment |
$begingroup$
hint
$$f(x)=P_2(x)+frac{x^3}{6}f'''(xi)$$
with
$$f'''(xi)=-2(cos(xi)+sin(xi))e^{xi}$$
$$=-2sqrt{2}cos(xi-frac{pi}{4})e^xi$$
thus
$$|f(x)-P_2(x)|le frac{sqrt{2}}{3}e$$
$endgroup$
$begingroup$
I have this already, I'm not sure where to go from here.
$endgroup$
– mXdX
Jan 13 at 18:55
$begingroup$
@mXdX Is it good now.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:00
$begingroup$
Is this for (3)?
$endgroup$
– mXdX
Jan 13 at 19:01
$begingroup$
@mXdX Now, it is for 3.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:05
$begingroup$
This answer is ~1.281, my textbook says the answer is 1.252. Do you think it's a typo?
$endgroup$
– mXdX
Jan 13 at 19:08
add a comment |
$begingroup$
hint
$$f(x)=P_2(x)+frac{x^3}{6}f'''(xi)$$
with
$$f'''(xi)=-2(cos(xi)+sin(xi))e^{xi}$$
$$=-2sqrt{2}cos(xi-frac{pi}{4})e^xi$$
thus
$$|f(x)-P_2(x)|le frac{sqrt{2}}{3}e$$
$endgroup$
$begingroup$
I have this already, I'm not sure where to go from here.
$endgroup$
– mXdX
Jan 13 at 18:55
$begingroup$
@mXdX Is it good now.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:00
$begingroup$
Is this for (3)?
$endgroup$
– mXdX
Jan 13 at 19:01
$begingroup$
@mXdX Now, it is for 3.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:05
$begingroup$
This answer is ~1.281, my textbook says the answer is 1.252. Do you think it's a typo?
$endgroup$
– mXdX
Jan 13 at 19:08
add a comment |
$begingroup$
hint
$$f(x)=P_2(x)+frac{x^3}{6}f'''(xi)$$
with
$$f'''(xi)=-2(cos(xi)+sin(xi))e^{xi}$$
$$=-2sqrt{2}cos(xi-frac{pi}{4})e^xi$$
thus
$$|f(x)-P_2(x)|le frac{sqrt{2}}{3}e$$
$endgroup$
hint
$$f(x)=P_2(x)+frac{x^3}{6}f'''(xi)$$
with
$$f'''(xi)=-2(cos(xi)+sin(xi))e^{xi}$$
$$=-2sqrt{2}cos(xi-frac{pi}{4})e^xi$$
thus
$$|f(x)-P_2(x)|le frac{sqrt{2}}{3}e$$
edited Jan 13 at 19:04
answered Jan 13 at 18:42
hamam_Abdallahhamam_Abdallah
38.1k21634
38.1k21634
$begingroup$
I have this already, I'm not sure where to go from here.
$endgroup$
– mXdX
Jan 13 at 18:55
$begingroup$
@mXdX Is it good now.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:00
$begingroup$
Is this for (3)?
$endgroup$
– mXdX
Jan 13 at 19:01
$begingroup$
@mXdX Now, it is for 3.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:05
$begingroup$
This answer is ~1.281, my textbook says the answer is 1.252. Do you think it's a typo?
$endgroup$
– mXdX
Jan 13 at 19:08
add a comment |
$begingroup$
I have this already, I'm not sure where to go from here.
$endgroup$
– mXdX
Jan 13 at 18:55
$begingroup$
@mXdX Is it good now.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:00
$begingroup$
Is this for (3)?
$endgroup$
– mXdX
Jan 13 at 19:01
$begingroup$
@mXdX Now, it is for 3.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:05
$begingroup$
This answer is ~1.281, my textbook says the answer is 1.252. Do you think it's a typo?
$endgroup$
– mXdX
Jan 13 at 19:08
$begingroup$
I have this already, I'm not sure where to go from here.
$endgroup$
– mXdX
Jan 13 at 18:55
$begingroup$
I have this already, I'm not sure where to go from here.
$endgroup$
– mXdX
Jan 13 at 18:55
$begingroup$
@mXdX Is it good now.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:00
$begingroup$
@mXdX Is it good now.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:00
$begingroup$
Is this for (3)?
$endgroup$
– mXdX
Jan 13 at 19:01
$begingroup$
Is this for (3)?
$endgroup$
– mXdX
Jan 13 at 19:01
$begingroup$
@mXdX Now, it is for 3.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:05
$begingroup$
@mXdX Now, it is for 3.
$endgroup$
– hamam_Abdallah
Jan 13 at 19:05
$begingroup$
This answer is ~1.281, my textbook says the answer is 1.252. Do you think it's a typo?
$endgroup$
– mXdX
Jan 13 at 19:08
$begingroup$
This answer is ~1.281, my textbook says the answer is 1.252. Do you think it's a typo?
$endgroup$
– mXdX
Jan 13 at 19:08
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%2f3072371%2fproblems-involving-the-second-taylor-polynomial-of-ex-cos-x%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