0
$\begingroup$

I have the following non-linear equation:

enter image description here

where $w0=0.25,w0=0.5,w0=0.75$. I have to prove that if $k$ is a root, then also $−k$ is a root and that there exists only one $k∈(0,1)$ root, but my MATLAB code doesn't return any solution.

Using wolframalpha I have computed the derivative of w0 and obtained, the constants w0=0.25=0.5=0.75 were ignored.

enter image description here

In MATLAB I have the following function to compute the roots of non-linear equations: enter image description here

And my test file looks like this: enter image description here

Any idea to make my code functional is appreciated.

$\endgroup$

1 Answer 1

2
$\begingroup$

You've written w1 = @(k) ((2*k)/(log((1+k)*(1-k))))-0.25; but your original function means this should be w1 = @(k) ((2*k)/(log((1+k)/(1-k))))-0.25; and similar for the other anonymous functions. The difference is division within the log rather than multiplication. Also note that there are singularities in this function at $k=\{-1, 0, 1\}$ and the function is complex valued outside of the range [0,1] so Newton's method will not be very reliable (especially since the roots are very close to the singularities at $\pm1$). You may be better off with a bracketing method such as bisection or false position.

Note that if your goal is to "prove" that if $k\in(0,1)$ is a root, then $-k$ is a root, finding the root numerically is not proof at all. You actually need to perform some (relatively simple) manipulations of the equation to show symmetry about $k=0$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.