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 CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by