hi everone,
i m new user . My dad just got for me MAPLE 11 last week. So interested! But when i do sloving equtaion 2*cos(x) - exp(x)= 0 interval -3..3. Maple only give me 1 solution instead of 2 solutions . I wonder if i my imput date is wrong. Can anyone help me, thx!
fsolve([exp(x) - 2*cos(x) = 0],x=-3..3);
{x = .5397851608}
2 options
One option to get both the solutions is with the avoid option for fsolve. It would look something like this
fsolve([exp(x) - 2*cos(x) = 0],x=-3..3);
fsolve([exp(x) - 2*cos(x) = 0],x=-3..3,avoid=%);
This tells fsolve to avoid the solution that was given in the previous output (which should be the line above if it was executed first).
Another options is to use the Roots command found in the Student:-Calculus1 package. The following will give both those solutions you were looking for in one output
Student:-Calculus1:-Roots(exp(x)-2*cos(x), x = -3 .. 3, 'numeric');
Scott
ploting before calculating
Usually, I ask to plot before doing anything else. In this case, I do:
Then the plot reveile what is happening
so now I can do:
and
Mario Lemelin
mario.lemelin@cgocable.ca
yes this is always helpful
i used to get something wrong
then I was told to plot before calculating, espeacially exponential and log and some high power functions..
OUPS!
Sorry for the first two line:
Mario Lemelin
mario.lemelin@cgocable.ca