isAlways: what did I do wrong?
2 views (last 30 days)
Show older comments
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');
Answers (0)
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!