Numerical Analysis Questions & Answers  
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.06.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?
10.07.17
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..
Question by Student 201427129
professor i wonder about Q#2 for Q#4-2
to solve Q#4, i must find interactions of Q#2 by secant method.
when i try, it give only condition $x_0$
accroding to lecture book, that method have 2 conditions
so i guess $x_1$ by orders of convergence to yield the at least itercations
(bisection problems are solved in #Q1 with same way
$\epsilon_{n+1}=\frac{1}{2}\epsilon_n\;\; \epsilon_k=\frac{\pi}{2^k}\;\; 3.142-\pi=\frac{\pi}{2^k} $ )

but in #Q2 problem is too hard
because it's convergence is superliner.
($k ^{p} = \frac{1} {2} *|\frac{sin(\pi)}{cos(\pi)}|=0, \epsilon =0,x_{n+1}=root) $
it means that $x_{n+1}=cost?!?!?$ so confused..
so i can't find proper and the smallest interactions
can you give some ways?
10.08.17
You should not determine $k$ or $p$ analytically from the function here. Rather you should find them from the error obtained at each iteration only.
Question by Student 201529190
Dear Professor, In Question #5 1,I think it should be added "|ϵ0|Newton =|ϵ0|secant ". Although does not affect the question, it will be more rigorous, and this is what you mentioned in class.
10.09.17
It is not necessary to distinguish between the initial error of Newton and of secant because both should be set to the same value for a fair comparison. Also, you should typeset your question better in the future and use latex for all math expressions.
Question by Student 201529190
Dear Professor,for the work times of diagonal matrix. To turn the number to zero from bottom. At row(N) no work so work(N)=o. At row(N-1), we need turn x_{N-1,N} to 0. It use 4 works (2moct+2add).so work(N-1)=4 \begin{bmatrix} ... & ... & ...& ... \\ ... & ... &... &... \\ ... & ... & ... &... \\ ...& x_{N-1,N-1} & x_{N-1,N} & x_{N-1,N+1} \\ ... & ...& x_{N,N} & x_{N,N+1} \end{bmatrix} At row(N-2), we need turn x_{N-2,N-1} and x_{N-2,N} to 0. It use 8 works 2*(2moct+2add).so work(N-1)=8 \begin{bmatrix} ... & ... & ...& ... \\ ... & ... &... &... \\ x_{N-2,N-2} & x_{N-2,N-1} & x_{N-2,N} & x_{N-2,N+1} \\ ...& x_{N-1,N-1} &0 & x_{N-1,N+1} \\ ... & ...& x_{N,N} & x_{N,N+1} \end{bmatrix} then \begin{bmatrix} ... & ... & ...& ... \\ ... & ... &... &... \\ x_{N-2,N-2} & 0 & 0 & x_{N-2,N+1} \\ ...& x_{N-1,N-1} &0 & x_{N-1,N+1} \\ ... & ...& x_{N,N} & x_{N,N+1} \end{bmatrix} so total work =\sum_{m=1}^{N-1} 4\times (N-n) =2*(N-1)^{2}\propto N^{2}. then C2 = 2.(THE LAST LINE CAN SHOW IN OTHER LaTeX EDITOR. I don,t know WHY it not show here..)
10.23.17
There's some problems in your question formulation: you need to make sure the math is surrounded by \$ signs. Please post again below with correct typesetting.
Previous   1  ...  6 ,  7 ,  8  ...  19    Next  •  PDF 1✕1 2✕1 2✕2  •  New Question
$\pi$