Solving complex algebraic expressions
Show older comments
I have two parameters:
z < (10.^(-10).*x.^(2).*exp((x.^2).^(-1)/4).*y.^(-1)/2).^(1/4);
z > (10.^(-15).*x.^(3).*exp((x.^2).^(-1)/4).*y.^(-1)).^(1/5);
I want to be able to solve for x leaving z and y symbolic, or if I need to I could assign values to one of both of the other parameters. Also I would like to find the data region between the two planes these equations generate given I replace (> and <) with = signs. What I really want in the end is to know if the minimum value of x given these equations as well as the maximum. Like I said if I could give these leaving z and y as variables this would be ideal.
Any help would be appreciated.
Also any time I try and simply solve this equations:
clear
>> syms x;
>>S = solve('(10.^(-10).*x.^(2).*exp((x.^2).^(-1)./4).*y.^(-1)./2).^(1./4)')
I get:
Error using ==> solve>getEqns at 182
' (10.^(-10).*x.^(2).*exp((x.^2).^(-1)./4).*y.^(-1)./2).^(1./4) ' is not a valid expression or equation.|
and I'm not exactly sure why.
2 Comments
Andrew Newell
on 25 Apr 2011
Are y and z parameters that you wish to remain fixed while minimizing or maximizing x?
William Duhe
on 25 Apr 2011
Answers (2)
Walter Roberson
on 25 Apr 2011
The symbolic toolbox does not use the dot expression in quoted strings.
Use
syms x y
S = solve((10.^(-10).*x.^(2).*exp((x.^2).^(-1)./4).*y.^(-1)./2).^(1./4), x);
Notice that the expression is not quoted.
Note: there is no solution in x for this particular expression.
In the more general case, with the inequalities, the expressions can be rewritten to reflect positive variables which are the difference between z and the other part of the expression. The position of the positive variable determines the sign of the inequality.
Let P1 be the positive variable for the first inequality and P2 be the positive variable for the second inequality. Then your set of inequalities becomes:
[(1/20000000000)*20000000000^(3/4)*(x^2*exp(1/(4*x^2))/y)^(1/4)-z-P1, z-(1/1000000000000000)*1000000000000000^(4/5)*(x^3*exp(1/(4*x^2)))^(1/5)-P2]
z appears exactly once, isolated, in each of these, so z can be eliminated. As both expressions are 0, they can be simply added to yield a new expression without z that must be 0:
(1/20000000000)*20000000000^(3/4)*(x^2*exp((1/4)/x^2)/y)^(1/4) - P1 - (1/1000000000000000)*1000000000000000^(4/5)*(x^3*exp((1/4)/x^2))^(1/5) - P2
which can be simplified to
(1/1000)*2^(1/4)*sqrt(5)*(x^2*exp(1/(4*x^2))/y)^(1/4)-P1-(1/1000)*(x^3*exp(1/(4*x^2)))^(1/5)-P2
You can substitute explicit positive values for P1 and P2 and proceed to solve. There are no solutions for sufficiently large or sufficiently small y -- the valid range is for y is roughly 10^(-12) to 10^40. You will probably need to use a higher Digits setting to solve near the bounds of that range.
Large y (e.g., 10^24) solve as roughly x = (P1+P2)/90 it appears.
There is a minima on x somewhere near y = 1/9, x = roughly 1/90, and as y approaches 10^(-16), x increases past 1 . The slope of the expression to be solved is very steep as y approaches 0 closely. The slope is, though, only roughly linear in ln(y)^(1/4) for larger y {i.e., quite shallow} until the term involving y becomes numerically too small to keep, at which point there is no solution.
2 Comments
William Duhe
on 25 Apr 2011
Walter Roberson
on 26 Apr 2011
For that expression:
The general expression is
x = (1/2)/(-LambertW(T, -(1/80000000000)/(z^4*y)))^(1/2)
which has a boundary when the LambertW() expression evaluates to -1 . T is the branch, and the common solutions are at T=0 and T=-1 . For those two values, the limit occurs when the second argument to LambertW evaluates to -1/exp(1) . This gives a lower bound on z for x to be real-valued.
When z is greater than the bound described above, there are two solutions for x, one of them probably less than 1/20 and the other of which increases beyond 1 fairly rapidly. The lower bound corresponds the T=-1 branch and the upper bound corresponds to T=0 branch.
Andrew Newell
on 25 Apr 2011
I'm not sure what you're trying to do in the first part of your question, but you can solve the second part using
syms x y;
eq = (10.^(-10).*x.^(2).*exp((x.^2).^(-1)./4).*y.^(-1)./2).^(1/4);
solve(eq,'x')
However, it does not have any solution. Perhaps you really want to solve for the equation equal to some value of z?
solve(eq-z,'x')
Categories
Find more on Calculus in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!