MATLAB: How to use equation solver with conditions

equation solver restrictions conditions.

syms x a r
x = isolate(-((2*(90 - x)^r - (2*x + 90)^r)*(a + 4)*(r - 1)==0,a)
Is it possible to ask matlab to solve the above equation setting as a condition that "a" is a positive number?
Ideally, I want matlab to return an equation rather than -4 as the solution.

Best Answer

Theoretically, yes:
syms x a r
assume(a > 0)
x = isolate(-((2*(90 - x)^r - (2*x + 90)^r)*(a + 4)*(r - 1))==0,a)
However,
Error using sym/isolate (line 108)
Unable to isolate 'a' because the equation has no solution.
Note that the equation you posted has an unmatched parenthesis. I added one to get this to work, so be sure all of them are in the correct places, and that you are not using more of them than you need to.