フィルターのクリア

help with solver

2 ビュー (過去 30 日間)
Doug Hates Squirrels
Doug Hates Squirrels 2011 年 6 月 7 日
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')

回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 6 月 7 日
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 件のコメント
Doug Hates Squirrels
Doug Hates Squirrels 2011 年 6 月 7 日
So a solution would be to write the problem as below?
solve('k^0.295*(1/(0.465*(-2.269*(k^0.381)-k)^0.195 + 0.222)^(5.128)) * (1/(-2.269*(k^0.381) - k)^(0.805)) - 328.957')
Walter Roberson
Walter Roberson 2011 年 6 月 7 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by