Saalehorizontale

MaplePrimes Activity


These are questions asked by Saalehorizontale

Hey guys, 

I am solving big systems of equations and doing some other stuff with the results. So now I got two diffrent ways and it turns out, that the give back the same result but they present it in diffrent ways. So my quesion now is, how can I simplify a symbolic number to its shortest form. In my example you can see, that the diffrence of y_1 and y_2 is 0, so they describe the same number. However y_2 is a way more complicated expression. So here I know the easier expression, but what if I dont. What is the right command to force maple to find a simplier expression for y_2? I read about evala but its doent do the job as you can see in the attached file. I also tryd things like simplify, normal, expand but it didint worked out too. simplify_symbolic_numbers.mw

restart; y_1 := RootOf(_Z^5-2*_Z^4+9*_Z^3-14*_Z^2+9*_Z-2, .4687 .. .4727); y_2 := 2*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)^4-9*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)^3+14*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)^2-9*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)+2; evala(Normal(y_1-y_2)); evala(y_2)

0

 

2*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)^4-9*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)^3+14*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)^2-9*RootOf(2*_Z^5-9*_Z^4+14*_Z^3-9*_Z^2+2*_Z-1, 2.109 .. 2.118)+2

(1)
 

NULL

Download simplify_symbolic_numbers.mw

Thank you for your help. Regards, Felix

Hey guys, 

 

I try to solve big systems of polynomial equations and inequalities. Therefore I use the command SemiAlgebraic. In the moment I take those result and want to go on calculating with them. Sadly it turns out, that solve has some problems with RootOf expressions. It doesnt find a solution (althoug the graph shows that there is one) and gives the warning solution may have been lost. So now I though I might just aks SemiAlgebraic to give me solutions without RootOf expressions. For example you can write {x = RootOf(_Z^2 - y)+1, 1 < y, y < 2} as {x=t+1, y=t^2,1<t<2^0.5 . This might be easier to work with for solve. 

So my question is: Is there any way I can tell SemiAlgebraic precisely in what form the solution should be? 
Since the websites are down Im not able to do a first own research on this problem. So thank you in advance. 

Regards

Felix

Hey guys, 

From a former calculation I got a set of points as a implicit RootOf function for an intervall. Now I want to check, if these points are in a certain area. So i thougt I take the RootOf function, the intervall and the inequalities (which describe the target area) and use the solve command. But then I get the warning, solutions may have been lost and no solution. When you draw the implicit function you can see thats in the right area (above y=1 and below y=x). So there should be a clear anwer, giving me back the whole RootOf function in the intervall.

Download QUESTI~2.MW

Since there was an error uploading the picture here the code 

restart;
Sol := {x = RootOf(_Z^2 - y, index = real[2]) + 1, 1 < y, y < 2};
area := {1 < y, y < x};
Sol_area := solve(Sol union area);
print(Sol_area);

So why do I get this warning, the calculation seems quite easy? And is there a workaround? Or a diffrent kind of solve function? SemiAlgebraic is as far as i know only for polynomials. So I got an error as well. Since the websites are down I could start an own reasearch before. So thank you in advance. 

Regards

Felix

Hey guys, 

I have a problem with the solve command. And since the websites are down, I cant help myself. I have a function x(y) and an intervall for y. This function or the set of points described by the function should now be transformed to another area of the plane. So now I can get a(x,y)=1/y and b(x,y)=x/(x+y-1) with just plugging in, then everything depeends from the y Invtervall. But I want to get the form b(a) and an intervall for a. So that I can see the function directly. So i thought I just put everything into the solve command and than ask for a solution for {a,b} and expected to get what I want. (Uploading the script here gives an error)
 

restart;
Sol := solve({a = 1/y, b = x/(x + y - 1), x = (y - 1)^2, 1 < y, y < 5/4});
Sol_ab := solve({a = 1/y, b = x/(x + y - 1), x = (y - 1)^2, 1 < y, y < 5/4}, {a, b});

#expected (or wanted) solution
#with y = 1/a and the inequalities we get 4/5 < a and a < 1 with y
#with y = we get x(a)/a and y(a) and reach b = 1/a - 1
#all together: Sol={b=1/a - 1, 4/4<a, a<1};

THe problem is, that I get an empty set which is obviously wrong. So I somehow make an error when making the variables I want concrete with adding {a,b}. What do I do wrong? Or is there a better command for what I want to achieve? In this case I can solve the problem via hand, but I have more complex tranformations and mor ecomplex functions x(y), so thats why I ask for general help with my problem. 

Thank ypu in advance

Felix

Download QUESTI~1.MW

Hey guys, 

I am solving many systems of polynomial equations. Sometimes I get the same solution, just in a diffrent are, so for example the first solution is for y between 0 and 1 and the second solution is for y between 1 and 2. So now I want to take those solutions intervals and combine them so I can make one solution out of two. However I am struggeling with working with intervals in Maple. It is not that easy how I expected it to be.

I wrote an own program which works quite nice unless there is a single solution which would meen an interval like [1,1] meaning y=1working_with_intervals.mw

restart; sets := [{1 < y}, {y <= 1/2, 0 < y}, {1/2 < y, y < 1}]; intervals := [RealRange(Open(1), Open(infinity)), RealRange(Open(0), 1/2), RealRange(Open(1/2), Open(1))]; correct_form := [y::(RealRange(Open(1), Open(infinity))), y::(RealRange(Open(0), 1/2)), y::(RealRange(Open(1/2), Open(1)))]; Sol := solve(`~`[convert](Or(op(correct_form)), relation))

[{1 < y}, {y <= 1/2, 0 < y}, {1/2 < y, y < 1}]

 

[RealRange(Open(1), infinity), RealRange(Open(0), 1/2), RealRange(Open(1/2), Open(1))]

 

[y::(RealRange(Open(1), infinity)), y::(RealRange(Open(0), 1/2)), y::(RealRange(Open(1/2), Open(1)))]

 

RealRange(Open(0), Open(1)), RealRange(Open(1), infinity)

(1)

restart; sets := [{1}, {1 < y}, {y <= 1/2, 0 < y}, {1/2 < y, y < 1}]; intervals := [[1, 1], RealRange(Open(1), Open(infinity)), RealRange(Open(0), 1/2), RealRange(Open(1/2), Open(1))]; correct_form := [y::[1, 1], y::(RealRange(Open(1), Open(infinity))), y::(RealRange(Open(0), 1/2)), y::(RealRange(Open(1/2), Open(1)))]; Sol := solve(`~`[convert](Or(op(correct_form)), relation))

[{1}, {1 < y}, {y <= 1/2, 0 < y}, {1/2 < y, y < 1}]

 

[[1, 1], RealRange(Open(1), infinity), RealRange(Open(0), 1/2), RealRange(Open(1/2), Open(1))]

 

[y::[1, 1], y::(RealRange(Open(1), infinity)), y::(RealRange(Open(0), 1/2)), y::(RealRange(Open(1/2), Open(1)))]

 

RealRange(Open(0), Open(1)), RealRange(Open(1), infinity)

(2)
 

NULL

Download working_with_intervals.mw

In the attached file you can see my problem. When I add the intervall [1,1] the solution should become (0,infty), but it seems like Maple does not understand what I mean by [1,1], so the 1 is not part of the solution "Sol".

FYI: I wrote a program which is able to convert "sets" into "intervals" into "correct_form" using RealRange, but it is not necesarry for my problem. 

So my questions are: Why doesnt Maple recognize [1,1] as an interval containing only the 1? Is there a way I can rewrite the intervall so I can use it for the solve process in "Sol"? I also thought about making two diffrent sets with the same intervals than adding [1,2) to the one set and (1,2) to the other set and than make an intersection but I seems to be very complicated for a seemingly easy problem. Is there a easier way to work with intervals? 

Regards and thank you

Felix

1 2 3 Page 1 of 3