0

I want to estimate roots of $f(x)=x^2-\sin x$(first root is obviously $x_1=0$ and second root is in the interval $[0.5,1]$ ) using bisection method.

We have trigonometry function $\sin x$ and ordinary function $x^2$ . so my question is should I put inputs as radians (for example calculate $f(\frac{\pi}{4})$) or I should use numbers (for example calculate $f(1)$ )?

Etemon
  • 6,437
  • Depends, radians versus degrees corresponds to two different functions. Its a choice and will produce two different answers (except at $x=0$) – QC_QAOA Nov 13 '20 at 17:10
  • @QC_QAOA: In fact I want to write program in excel to estimate. which one is better to use you think? – Etemon Nov 13 '20 at 17:11
  • You can't choose between radians and numbers, that's like choosing between Celsius and temperature. Radians are a unit. You can have $\frac{\pi}{4}$ radians just as well as $\frac{\pi}{4}$ degrees. – DMcMor Nov 13 '20 at 17:12
  • @DMcMor I am confused should I use for example $x=\frac{\pi}{4}\approx 0.785$ for $x^2$ and for $\sin$ input it as $\frac{\pi}{4}$ and get: $f(\frac{\pi}{4})= 0.785^2-\sin(\frac{\pi}{4})$? – Etemon Nov 13 '20 at 17:16
  • No. $\frac{\pi}{4}$ is a number. Yes, it is approximately $0.785$, but you shouldn't use the approximation for one $x$ and the exact value for the other. Writing $\left(\frac{\pi}{4}\right)^{2} - \sin\left(\frac{\pi}{4}\right)$ is perfectly fine, and more correct. – DMcMor Nov 13 '20 at 17:19
  • @DMcMor I got it thank you. – Etemon Nov 13 '20 at 17:20

0 Answers0