sin^(2)x = cosx+sinxcosx
divide both sides by sin(x),
sin(x) = cot(x) + cos(x)
Imagine a right-angled triangle with
hypotenuse = 1+ t
opposite side = 2√t
adjacent side = 1 - t
We can now use the following substitutions for sin(x) cos(x) and cot(x).
sin(x) = 2√t/(1 + t)
cos(x) = (1 - t)/(1 + t)
cot(x) = (1 - t)/(2√t)
Making these substitutions into the final trig equation above,
2√t/(1 + t) = (1 - t)/(2√t) + (1 - t)/(1 + t)
Multiply both sides by (1 + t),
2√t = (1 – t2)/(2√t) + (1 - t)
Simplify by multiplying by 2√t, then multiplying out,
4t = 1 – t2 + 2√t – 2t3/2
Substituting for u^2 = t,
4u^2 = 1 – u^4 + 2u – 2u^3
u^4 + 2u^3 + 4u^2 - 2u – 1 = 0
Newton’s method of approximation
x_(n+1) = x_n – f(x_n) / f‘(x_n)
We have f(u) = u^4 + 2u^3 + 4u^2 - 2u – 1
from which, f’(u) = 4u^3 + 6u^2 + 8u - 2
And
u_(n+1) = u_n – f(u_n) / f‘(u_n)
1st Approximation, u_0
The original equation is trigonometric. Solutions will (probably) be cyclic. A range from which to start would be [0, 2π].
A reasonable value for u_0, from which to start our iteration process, would be u_0 = 1.
n u_n f(u_n) f’(u_n) u_(n+1) = u_n – f(u_n) / f‘(u_n)
0 1 4 16 0.75
1 0.75 0.9101 9.0625 0.64957
2 0.64957 0.1148 6.8245 0.6327
3 0.6327 2.93E-03 6.477 0.63229
4 0.63229 2.09E-06 6.4683 0.63229
5 0.63229
To 4 places of decimals, the solution is: u = 0.6323
Now, we have sin(x) = 2√t/(1 + t) = 2u/(1 + u^2), giving us
sin(x) = 2*0.6323 / (1 + 0.6323^2)
sin(x) = 1.2646 / 1.3998 = 0.9034
x = 1.1276 rad