Items tagged with cotangent


Here is one that the students generated which caused confusion. 

a := 0.76;
eq1 := 2*cot(a*sqrt(2*E)) = (2*E-5.4)/(sqrt(E*(5.4-E));
solve(eq1, E)

And the results are: 0., 4.411954070, 2.423743792

The problem is with the second answer because it does not exist. If we plot the LHS and the RHS of eq1 vs E where E=0..5.4

plot([2*cot(0.76*sqrt(2*E)), (2*E-5.4)/sqrt(E*(5.4-E))], E=0..5.4, -3..3)

And it gets more interesting, if we calculate:

solve(evalf(eq1), E)

The answers are: 0., 2.423743793, 14.33807304+27.39159712*I

where the 3rd answer is again incorrect.

Finally, if a = 0.8 or larger, the incorrect answers disappear. 

Note - fsolve does handle this problem correctly. And despite my attempts to remind them to use fsolve, they see the solve command as the universal truth. Apparently this will be another teaching moment for next year.

So any thoughts about why this happens and why there is a difference in the outcomes between 0.76 and 0.8 for the value of a?


Page 1 of 1