isAlways: what did I do wrong?

2 ビュー (過去 30 日間)
Art
Art 2012 年 11 月 6 日
Hi,
I have a somewhat complicate function of only 1 variable. When I plot it from the range [1, 10], it's clear that the function is always negative. However, when I use isAlways (with appropriate assumptions on the domain of the function), it gives me an unknown (unable to prove). Please find the sample code below. Seems like you'd need R2012 for assumeAlso to work.
Thanks a lot!
clear;
syms x real
W2 = 2*((25*(3*x - 30))/(11*(25*x - 8)^2) - 3/(11*(25*x - 8)) + 75/(25*x - 8)^2)*((3*x - 30)/(11*(25*x - 8)) + 3/(25*x - 8) - 1/11) - 2*((25*(3*x - 27))/(11*(25*x + 17)^2) - 3/(11*(25*x + 17)))*((3*x - 27)/(11*(25*x + 17)) - 1/11);
assumeAlso(x >= 1);
assumeAlso(x < 10);
fW2 = inline(char(W2));
fplot(fW2, [1, 10]);
isAlways(W2 < 0, 'Unknown', 'error');
  1 件のコメント
Art
Art 2012 年 11 月 6 日
Nevermind... got it, I think. After I did
W2 = simple(W2);
And do the same thing, it gives me the answer.
Thanks!

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by