Question by Student 201542124 Professor, I have a question about the assignment #2 question 1(a). At first, I started the bisection method about f=sin(x) with the interval [3,4]. And then, I tried it with [3.1, 3.2] again. As a result, the number of interactions in each case was different. Therefore, I think there is a possibility that we have different answers according to the intervals. Are there rules to decide the intervals?
 10.05.17
Yes, of course, the number of iterations will depend on the initial interval chosen. This is why the initial interval is specified in the question. There are no rules that can be used to guess a proper initial interval that would apply in the general case because each function has a different behaviour. But if you do know the function, then it may be possible to specify an initial interval that is quite close to the root through a good guess for the root. 1 point bonus boost.
 Question by Student 201427122 Professor, When I solved Question #1 (a), I appointed $$X_{min}=π/2$$ $$X_{max}=3π/2$$ Then I used the bisection method. Consequently The answer is $X_{13}$=3.1412... So $X_{13}$ is 3.141 for least 4 significant digits. Continuously, $$X_{14}=3.14140,X_{15}=3.14149, X_{16}=3.1415$$ Then I think $X_{16}$=3.142 for least 4 significant digits is answer. Because π is 3.142 for least 4 significant digits. I don't understand Why Your answer is 13. Did I equate wrong equation in this Question?
 10.06.17
Here's a hint. Simply obtaining the 4th digit is not enough. You need to make sure the 4th significant digit is actually valid.. The best way to solve this problem is to specify what is the maximum allowable value of the relative error $\epsilon$ needed here and to determine analytically how many iterations is needed to reach this level. In the exam, I may ask you a similar question but instead of 4 significant digits, I may ask you for 100 significant digits. Solving the problem by hand one iteration at a time will take too long. Thus, you should aim to find here an analytical expression giving you number of iterations for a certain $\epsilon$ sought. 1 point bonus.
 Question by Student 201627131 Professor, I have a question about radian in C code. If I use radian in C code, Can compiler read radian? And, PI is infinite decimals, so how can I express PI? I think if I declare PI = 3.14, result will include big error.
 10.07.17
Just define $\pi$ in the preamble of your code with
#define pi 3.141592920
In C, the functions sin, cos, etc must always be used with radians.
 Question by Student 201627148 professor, in Q#4(b), when I was solving that, I found something strange. I guess root is π because $x_1,x_2,x_3$ are convergent to π. so I made this equation ε=x-π, because of ε=x-r.then I got $ε_1,ε_2,ε_3$ and p. But p is different every trying. I think x is infinite number, so it has error. Is answer p perfectly same 1.618?
Yes $p$ varies as the iteration count varies. You should explain why this is. There is one reason for the discrepancy in the first few iterations and another reason when approaching machine accuracy. Explain both.
 Question by Student 201427122 Professor, In Question #5 1, $$|\epsilon_{n}|_{Newton}/|\epsilon_{n}|_{secant}=(|1/2*f^{\prime\prime}(r)/f^{\prime}(r)| |\epsilon_{0}|)^{(2^{n}-1.618^{n})}$$ When I have written down my note, This equation was proportional to each other. which one do i choose between two equation?
Proportional to does not exclude equal to..
 Previous   1  ...  7 ,  8 ,  9  ...  14    Next  •  PDF 1✕1 2✕1 2✕2
 $\pi$