From: SourceForge.net <no...@so...> - 2012-04-27 15:54:54
|
Bugs item #3520954, was opened at 2012-04-24 03:43 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3520954&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Solving equations Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mikael Samsøe Sørensen (mrverify) Assigned to: Nobody/Anonymous (nobody) Summary: Solve returns [] when solutions exists Initial Comment: When exponents contain decimals with many figures you risk: Maxima v. 5.25.1 (%i1) solve(%e^(0.0057195*x)+%e^(-0.0057195*x)=1,x); (%o1) [] But solutions exist. Removing a decimal in the exponents: (%i1) solve(%e^(0.005719*x)+%e^(-0.005719*x)=1,x); << expression too long ... >> Removing 1 more returns a list of result. A warning would be nice. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2012-04-27 08:54 Message: I think that if you are seeking numerical answers you should use a numerical method. find_root works great on this example: find_root(112.02267*%e^(-0.0057195*x)/(1.80517*%e^(-0.0057195*x)+1)^2-1.97,x,0,1000) 694.8021925434504 ---------------------------------------------------------------------- Comment By: Mikael Samsøe Sørensen (mrverify) Date: 2012-04-26 13:40 Message: Good point. I tried to find a simpler version version of the actual equation that had the problem. But failed to see that it didn't have soutions. here is the right equation solve(112.02267*%e^(-0.0057195*x)/(1.80517*%e^(-0.0057195*x)+1)^2-1.97=0,x) it has a real solution at x=694.8 ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-04-24 09:02 Message: A warning about what? Note also that your expression is equivalent to 2*cosh(.0057195*x)=1, which has no solution for real x. There is, of course, a solution for imaginary values of x, and maxima can solve 2*cosh(.0057195*x)=1. And maxima 5.27 appears to be finding roots of the original equation, but I didn't wait. For .00571, maxima returns a long list, but they're not actually solutions because x appears on both the lhs and the rhs. That's a bug in solve. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3520954&group_id=4933 |