I am new to Matlab. I know that for simple equations, the solve()
function in matlab can return all the real roots.
however I want to find the roots, and especially, the smaller root of this equation:
1-(x/5) + (x/5)*log(x/5) = 0.4
when I use
ezplot(1-(x/5) + (x/5)*log(x/5))
,
I can get this graph:
We know that the value of the expression definitely goes to infinity as x -> inf
.
So 1-(x/5) + (x/5)*log(x/5)=0.4
would clearly have 2 different real roots.
However when I use
solve(1-(x/5) + (x/5)*log(x/5) == 0.4)
,
I can only get the expression of the greater root, which is evaluated to 10.0982
. There should be another root at around x = 1.2
but I cannot find it from the ans.
Would anyone tell me why the function won't return anything about the smaller root? Is it because the exact expression of the root cannot be found? How can I get the numeric value of this root?
Thanks.