a question I got stuck in numerical analysis course

circuit975

New member
Joined
Jul 12, 2024
Messages
5
1720798819153.png

I'm faced with a question like this.


The steps I did to solve this question are as follows;

first I calculated cos(0.5) and found the result 1. T=1

and I go and as step 1; 1-(0.5^2 / 2!) = 0.875

I then calculated the relative error percentage as follows; €a = [T1 - T0 / T1] x 100 = 14.29% relative error result

As step 2; 1-(0.5^2/2!) + (0.5^4/4!) = 0.875 + 0.002604 = 0.87760 I then calculated the relative error percentage as follows; €a = [T2 - T1 / T2] x 100 = 0,30% relative error result

Step 3; 1-(0.5^2/2!) + (0.5^4/4!) - (0.5^6/6!) = -1.292396 and I'm stuck here and I don't know what to do next because the next values I find are even higher than the previous error values. Can you help me where I am making the mistake. I am already grateful to the community.
 
View attachment 38340

I'm faced with a question like this.


The steps I did to solve this question are as follows;

first I calculated cos(0.5) and found the result 1. T=1

and I go and as step 1; 1-(0.5^2 / 2!) = 0.875

I then calculated the relative error percentage as follows; €a = [T1 - T0 / T1] x 100 = 14.29% relative error result

As step 2; 1-(0.5^2/2!) + (0.5^4/4!) = 0.875 + 0.002604 = 0.87760 I then calculated the relative error percentage as follows; €a = [T2 - T1 / T2] x 100 = 0,30% relative error result

Step 3; 1-(0.5^2/2!) + (0.5^4/4!) - (0.5^6/6!) = -1.292396 and I'm stuck here and I don't know what to do next because the next values I find are even higher than the previous error values. Can you help me where I am making the mistake. I am already grateful to the community.
What's (0.5^6/6!)?
 
My calculator says 0.00002170 rounded (result of 0.015625 ÷ 720). :)
[imath]\;[/imath]
Instead of this kind of talk, wouldn't it be better to talk about what is wrong and how it should be in an instructive way for the whole question?
 
You need to approximate to two significant digits, this means the condition to meet is:

[imath]\displaystyle |\varepsilon_a| < \frac{0.5 * 10^{2-2}}{100} = 0.005[/imath]

We start:

First Approximation:
[imath]\displaystyle \cos 0.5 \approx 1[/imath]

Second Approximation:
[imath]\displaystyle \cos 0.5 \approx 1 - \frac{(0.5)^2}{2} = 0.875[/imath]

[imath]\displaystyle \varepsilon_a = \frac{0.875 - 1}{0.875} = -0.142857[/imath]

[imath]\displaystyle |\varepsilon_a| = |-0.142857| = 0.142857 > 0.005[/imath]
(Condition did not meet, we add another term.)

Third Approximation:
[imath]\displaystyle \cos 0.5 \approx 1 - \frac{(0.5)^2}{2} + \frac{(0.5)^4}{24}= 0.877604167[/imath]

[imath]\displaystyle \varepsilon_a = \frac{0.877604167 - 0.875}{0.877604167} = 0.002296736[/imath]

[imath]\displaystyle |\varepsilon_a| = |0.002296736| = 0.002296736 < 0.005[/imath]
(Condition met, then we stop.)

This means that we need at least [imath]3[/imath] terms to approximate [imath]\cos(0.5)[/imath] to two significant digits.

[imath]\cos(0.5) \approx 0.88[/imath]
 
You need to approximate to two significant digits, this means the condition to meet is:

[imath]\displaystyle |\varepsilon_a| < \frac{0.5 * 10^{2-2}}{100} = 0.005[/imath]

We start:

First Approximation:
[imath]\displaystyle \cos 0.5 \approx 1[/imath]

Second Approximation:
[imath]\displaystyle \cos 0.5 \approx 1 - \frac{(0.5)^2}{2} = 0.875[/imath]

[imath]\displaystyle \varepsilon_a = \frac{0.875 - 1}{0.875} = -0.142857[/imath]

[imath]\displaystyle |\varepsilon_a| = |-0.142857| = 0.142857 > 0.005[/imath]
(Condition did not meet, we add another term.)

Third Approximation:
[imath]\displaystyle \cos 0.5 \approx 1 - \frac{(0.5)^2}{2} + \frac{(0.5)^4}{24}= 0.877604167[/imath]

[imath]\displaystyle \varepsilon_a = \frac{0.877604167 - 0.875}{0.877604167} = 0.002296736[/imath]

[imath]\displaystyle |\varepsilon_a| = |0.002296736| = 0.002296736 < 0.005[/imath]
(Condition met, then we stop.)

This means that we need at least [imath]3[/imath] terms to approximate [imath]\cos(0.5)[/imath] to two significant digits.

[imath]\cos(0.5) \approx 0.88[/imath]
I thank you very much for your valuable reply.

I would like to ask the following;
shouldn't we take cos(0.5) = 0.877 at the beginning?
I mean, shouldn't we take it in radians?
why did we take 1?
can we clarify this
 
2.170 ?
Can you be clear about what you are trying to achieve?
My point is that each new partial sum is obtained by adding or subtracting a term that gets smaller and smaller (do you see why?) If the pattern breaks you need to check your calculations.
 
Instead of this kind of talk, wouldn't it be better to talk about what is wrong and how it should be in an instructive way for the whole question?
Yes, this is especially important for the OP who is trying to get help. In order to help it is important to get answers and explanations from the OP so that the helpers can see where the help is needed.
 
I thank you very much for your valuable reply.

I would like to ask the following;
shouldn't we take cos(0.5) = 0.877 at the beginning?
No. We take the first term in the expansion.

why did we take 1?
Because [imath]1[/imath] is the first term in the expansion.

It is very important and mandatory step to start your approximation with the first term in the [imath]\cos x[/imath] expansion because the relative error in the second approximation depends on it.
 
Top