Menu Close

Question-175785




Question Number 175785 by otchereabdullai@gmail.com last updated on 06/Sep/22
Commented by Ar Brandon last updated on 07/Sep/22
#include <stdio.h> #include <math.h> int main(void) { double fx, gx, xn, x_m; printf("Enter initial value:"); scanf("%lf", &xn); for(int i=0; i<100; i++) { fx = pow(xn, log(2)/log(3))-sqrt(xn)-1; gx = log(2)/log(3)*pow(xn,log(2)/log(3)-1) -0.5/sqrt(xn); x_m = xn - fx / gx; xn = x_m; } printf("x ≈ %.2f\n", xn); return 0; }
Commented by Ar Brandon last updated on 07/Sep/22
x=9  Newton-Raphson′s method with initial   value x_0 =1 and 100 repetitions.
$${x}=\mathrm{9} \\ $$$$\mathrm{Newton}-\mathrm{Raphson}'\mathrm{s}\:\mathrm{method}\:\mathrm{with}\:\mathrm{initial} \\ $$$$\:\mathrm{value}\:{x}_{\mathrm{0}} =\mathrm{1}\:\mathrm{and}\:\mathrm{100}\:\mathrm{repetitions}. \\ $$
Commented by Frix last updated on 07/Sep/22
this is again no math example but a magic  trick example. obviously (at least for me)  x=9. but no exact method is possible. or  else try  x^(log_2  3) =(√x)+1
$$\mathrm{this}\:\mathrm{is}\:\mathrm{again}\:\mathrm{no}\:\mathrm{math}\:\mathrm{example}\:\mathrm{but}\:\mathrm{a}\:\mathrm{magic} \\ $$$$\mathrm{trick}\:\mathrm{example}.\:\mathrm{obviously}\:\left(\mathrm{at}\:\mathrm{least}\:\mathrm{for}\:\mathrm{me}\right) \\ $$$${x}=\mathrm{9}.\:\mathrm{but}\:\mathrm{no}\:\mathrm{exact}\:\mathrm{method}\:\mathrm{is}\:\mathrm{possible}.\:\mathrm{or} \\ $$$$\mathrm{else}\:\mathrm{try} \\ $$$${x}^{\mathrm{log}_{\mathrm{2}} \:\mathrm{3}} =\sqrt{{x}}+\mathrm{1} \\ $$
Answered by Ar Brandon last updated on 07/Sep/22
Answered by LordKazuma last updated on 07/Sep/22
x^(log_3 2)  = (√x)  + 1  let x = 3^t  ⇒ (√x) = 3^(t/2)   3^(t ∙ log_3 2)  = 3^(t/2)  + 1  3^(log_3 2^t )  = 3^(t/2)  + 1  2^t  = 3^(t/2)  + 1  the value of t that statisfies this equation only  t = 2 ⇒ x = 3^t  ⇒ x = 9
$${x}^{{log}_{\mathrm{3}} \mathrm{2}} \:=\:\sqrt{{x}}\:\:+\:\mathrm{1} \\ $$$${let}\:{x}\:=\:\mathrm{3}^{{t}} \:\Rightarrow\:\sqrt{{x}}\:=\:\mathrm{3}^{\frac{{t}}{\mathrm{2}}} \\ $$$$\mathrm{3}^{{t}\:\centerdot\:{log}_{\mathrm{3}} \mathrm{2}} \:=\:\mathrm{3}^{\frac{{t}}{\mathrm{2}}} \:+\:\mathrm{1} \\ $$$$\mathrm{3}^{{log}_{\mathrm{3}} \mathrm{2}^{{t}} } \:=\:\mathrm{3}^{\frac{{t}}{\mathrm{2}}} \:+\:\mathrm{1} \\ $$$$\mathrm{2}^{{t}} \:=\:\mathrm{3}^{\frac{{t}}{\mathrm{2}}} \:+\:\mathrm{1} \\ $$$$\mathrm{the}\:\mathrm{value}\:\mathrm{of}\:{t}\:\mathrm{that}\:\mathrm{statisfies}\:\mathrm{this}\:\mathrm{equation}\:\mathrm{only} \\ $$$${t}\:=\:\mathrm{2}\:\Rightarrow\:{x}\:=\:\mathrm{3}^{{t}} \:\Rightarrow\:{x}\:=\:\mathrm{9}\: \\ $$
Commented by LordKazuma last updated on 07/Sep/22
$$ \\ $$

Leave a Reply

Your email address will not be published. Required fields are marked *