help with solver
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to solve an equation in Matlab and for some reason I can't get Matlab to solve it. The problem is a little on the nasty side, and trying to solve it by hand has thrown me a little bit. The code is below. Any help is appreciated!
solve('x^0.295*[0.465*(-2.269*(x^0.381)-x)^0.195 + 0.222]^(-5.128) * [-2.269*(x^0.381) - x]^(-0.805) - 328.957')
0 commentaires
Réponses (1)
Walter Roberson
le 7 Juin 2011
solve() does not know square brackets as being grouping brackets: square brackets are subscript indexing inside a quoted string.
Negative numbers to a floating point power have ambiguous meaning, and will be transformed in to complex logs, probably leading to a complex result even when there might be a real root. If you are trying to solve() an equation symbolically you are best off using rational coefficients and perhaps even explicit formulation to ensure you get real results.
2 commentaires
Walter Roberson
le 7 Juin 2011
The term in the denominator, -2.269*(x^0.381)-x, is negative for all positive x, so one gets in to a tricky complex multiplication hoping that the two parts are complex conjugates. That turns out not to happen: the denominator is complex for all non-negative x.
Using the complex log interpretation of a negative number to a floating power, the only point at which the denominator becomes real is at approximately x = -1.1004865, at which point the overall value of the expression becomes approximately -331.21000 which is not even close to 0.
As x approaches negative infinity, the complex part of the expression reaches a limit of 0 from above, and the overall value of the expression reaches -328.957.
Thus, the expression has no roots, not unless one assigns a different meaning to a negative number raised to a non-integral power.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!