Numerical Analysis Questions & Answers  
Question by Student 201427127
Professor, I can't distinct what is prod1 and prod2 at C++ programing code that you made which was $\pi$ and $\sum$ at your note on blackboard. Thank you. I can use LATEX now.
09.05.18
It was written $\Pi$ — not $\pi$ — on the blackboard. I explained prod1 and prod2 again at the beginning of the class today. 0.5 point bonus for the effort.
Question by Student 201527121
I want to prove it by solving simple equation. $$y=\sqrt{(g^2+1)}\pm....$$ substitue small terms into x $$y=\sqrt{(g^2+1)}+x$$ $$\sqrt{(g^2+1)}+x=\sqrt{(g^2+1\pm2\epsilon_{mach} g^2)}$$ Square both sides. $$(g^2+1)+2\sqrt{g^2+1}x+x^2=(g^2+1\pm2\epsilon_{mach} g^2)$$ $$2\sqrt{g^2+1}x=-(g^2+1)+(g^2+1)\pm2\epsilon_{mach} g^2-x^2$$ Square of both sides again $$4(g^2+1)x^2=x^4\mp4\epsilon_{mach} g^2 x^2+4\epsilon_{mach}^2g^4$$ $\epsilon_{mach}^2$ is enough small to assume zero value. Rearrange function and eliminate $x^2$ and $\epsilon_{mach}^2$ $$4(g^2+1)\pm4\epsilon_{mach} g^2=x^2$$ $$x=\pm2\sqrt{g^2+1\pm\epsilon_{mach}g^2}$$ As a result, we can guess $$y=\sqrt{g^2+1}\pm2\sqrt{g^2+1\pm\epsilon_{mach}g^2}$$
09.10.18
There is a problem with your proof. When you write $$ 4(g^2+1)x^2=x^4\mp4\epsilon_{mach} g^2 x^2+4\epsilon_{mach}^2g^4 $$ You cannot say that the term $\epsilon_{mach}^2 g^4$ is negligible because $\epsilon_{mach}^2 \ll \epsilon_{mach}$. Here, $g^4$ can be much greater than $g^2$.. Thus, $\epsilon^2 g^4$ can be as large or larger than $\epsilon g^2 x^2$ and the final answer you give for $x$ is wrong. Nonetheless I'll give you 2 points bonus for the effort.
Question by Student 201427148
Professor, I want to check my Answer of the problem, which handed-out at Class 10th, Sep 2018. $$ -Given Equation. y=\sqrt{g^{2}+2\epsilon_{MACH} g^{2}+1} $$ $$ -Wanted Equation. y=\sqrt{g^{2}\pm1}+x $$ $$ -Used Equation. (a+b)^{c}=a^{c}+bca^{c-1}+...+ $$ $$ -PROBLEM : Find x. $$ 1st, I found that The Equation which must be used to solve the problem(Used Equation) is the Binomial Expansion. So, I Transform the Used Equation to Binomial Expansion like under Equation. $$ (a+b)^{c}=a^{c}+c\left(\frac{1}{1!}\right)a^{c-1}b+c(c-1)\left(\frac{1}{2!}\right)a^{c-2}b^{2}+For (a\gg b) $$ Then I Transform the Given Equation like under Equation. $$ y=\sqrt{(g^{2}+1)\pm\epsilon_{MACH}g^{2}} $$ And, Permutate each term to a, b, c. $$ a=g^{2}+1, $$ $$ b=\pm2\epsilon_{MACH}g^{2}, $$ $$ c=\frac{1}{2} $$ Before substituting the Permutated terms to Expansion, I confirmed that the condition $(a\gg b)$ is satisfied. As $g$ is larger number and $\epsilon_{MACH}$ is almost zero. Then, $a$ is more bigger than $g$ and $b$ is almost zero. So, I could use the upper Binomial Expansion. Then, I Substituted Each terms to Expanded Equation like under. $$ y=\sqrt{(g^{2}+1)\pm\epsilon_{MACH}g^{2}} $$ $$ = \sqrt{g^{2}+1}\pm{2\epsilon_{MACH}\left(\frac{1}{2}\right)\left(\frac{1}{1!}\right)\frac{1}{\sqrt{g^{2}+1}}} +\left(\pm2\epsilon_{MACH}g^{2}\right)^{2}\left(\frac{1}{2}\right)\left(\frac{-1}{2}\right)\left(\frac{1}{2!}\right) (\sqrt{g^{2}+1})^{\frac{-2}{3}}+...+ $$ In this Expanded Series, I found the pattern. The pattern is that, The 'n'th terms has $\left(\epsilon_{MACH}\right)^{n-1}$. As $\left(\epsilon_{MACH}\right)^{2}$ is almost zero,that I could ignore all terms without 1st term $\left(\sqrt{g^{2}+1}\right)$ and 2nd term $\left(\pm{2\epsilon_{MACH}\left(\frac{1}{2}\right)\left(\frac{1}{1!}\right)\frac{1}{\sqrt{g^{2}+1}}}\right) $. Finally Two Terms left from Series. $$ y\approx \sqrt{g^{2}+1}\pm{2\epsilon_{MACH}\left(\frac{1}{2}\right)\left(\frac{1}{1!}\right)\frac{1}{\sqrt{g^{2}+1}}} $$ Thus, the wanted $x$ is $$ x=\pm\frac{g^{2}}{\sqrt{g^{2}+1}}\epsilon_{MACH} $$ I'll wait your advice for my first using LATEX and my solution. Thank you.
09.11.18
That's not a bad proof, but it will fail to be valid if $(\epsilon_{\rm mach}g^2)^2$ is not much smaller than $\epsilon_{\rm mach}$. For $\epsilon_{\rm mach}\approx 10^{-15}$, this will happen when $g>6000$.. Thus, your proof is valid only for not so high values of $g$. I'll give you 2 points bonus for the effort.
Question by Student 201727142
Professor, I can't understand that you teached last class about $\epsilon_x$. You teached $X=1.0/(SQRT(g^2+1)+g)$ and you said $y=\sqrt{g^2+1}\pm \epsilon_{mach} \sqrt{g^2+1}$. and then i think X=1.0/(y+g) , $X =\frac{1\pm \epsilon_{mach}}{\sqrt{g^2+1}\pm \epsilon_{mach} \sqrt{g^2+1} + g}$. But, you teached us $X =\frac{1\pm \epsilon_{mach}}{\sqrt{g^2+1}\pm \epsilon_{mach} \sqrt{g^2+1}}$. Why is (denominator's g) disappeared?
09.12.18
Oups, I lost the $g$ on the denominator. So, keep $g$ there and add $\epsilon_{\rm mach}g$ on the denominator. Then, you'll get (in worse case scenario): $$ x=\frac{1\pm \epsilon_{\rm mach}}{\sqrt{g^2+1}+g\pm \epsilon_{\rm mach}(\sqrt{g^2+1}+|g|)} $$ You can figure out the following steps on your own following the same logic as shown in class.. Good observation: 2 points bonus.
Question by Student 201427113
Dear prof. B. Parent When i wanted to change base 2 :0000 0000 to base 10, the answer is 1 in the note during class. But i can't understand why the answer is 1 and it's two' complement is also 1. Because in case of one's complement, same base 2 0000 0000 is base10 '0' so i'm confused.
09.13.18
00000000 is zero either with the two's complement or the one's complement. I think you mean 11111111. Then, the one's complement is -0 but the two's complement is -1. You may have the rows mixed up.
Question by Student 201527119
Professor, I have an question about Question #6 in Assignment 01.
I think Question #6 $\textrm{i)}$ and $\textrm{ii)}$ are changed, and answer is wrong too.
Therefore, $\textrm{i)}$ is significand. and $\textrm{ii)}$ is exponent.
09.16.18
The answers given for one question are not necessarily in the correct order. There is no mistake in the answers. Think about this more carefully.
Previous   1  ...  11 ,  12 ,  13  ...  19    Next  •  PDF 1✕1 2✕1 2✕2  •  New Question
$\pi$