## 431 Reputation

14 years, 196 days

## That was Maple V....

@Carl Love Maple 16 seems nicer.

What would this produce, 25 answers?

 isolve({x>3/2, x<13/2, y>3/2, y<13/2});

Also

 S := {-1/2 < 2/53*f+7/53*g, 7/53*f-2/53*g < 1/2, 2/53*f+7/53*g < -37/106, 3/106 < 7/53*f-2/53*g}; R := {(g+4)*(g+3), f*(f-1)*(f-2)};isolve(S union R);

gives full solution. So a solution would be to first figure each variable's range. In observation it seems a false approach for isolve to produce over a cartesian product of ranges.

Does isolve accept inert Product expressions?

## Divide....

Dividing (c,d) plane with the polynomials involved this image is obtained. The range of x: -1..1 was not used.

@Carl Love The order of eliminations I employed:

{cos(p1), sin(p1), sin(p2), cos(p3), sin(p3), cos(p2)}, {cos(t3), sin(t3)}, {sin(t2)}, {cos(t2)}, {y}.

Eliminating cos(t2) gave the first occurence of RootOf. Eliminating y gave 3 cases, all quadratic in x. That is my previous post. Perhaps you could reproduce this.

## Sequential elimination....

@cuongtd Eliminating sequentially individual variables reduces the system to this:

 proc()local t264, t334, t309, t310, t336, t312, result, t337, t292, t339, t343, t321, t344, t346, t345, t323, t299, t347, t304, t324, t342, t325, t328, t307,t326, t332, t331, t333, t306;global x, y, eta1, eta3, eta2, Alpha1, Alpha2;    t328 := Alpha2*eta3;    t325 := 8*t328;    t347 := t325 + 4;    t326 := -4*t328;    t333 := x*eta2;    t346 := t326 - 4*t333;    t309 := eta2^2;    t310 := eta3^2;    t304 := Alpha1^2;    t336 := 4*t304;    t306 := Alpha2^2;    t345 := (-8*(Alpha1 - eta2)*x - 4*t310 - 4*t306 + t336 - 4*t309 + t347)*eta1;    t332 := Alpha1*x;    t292 := -4*t332;    t344 := t292 + 4*t333 - 2*t309;    t312 := x^2;    t299 := 2*t304;    t307 := eta1^2;    t343 := 2*t309 + 4*t312 - 4*t307 - 2 + t299 + t292 + t346;    t331 := t304 + t306;    t342 := -t331 + 2*t332;    t339 := -8*t312;    t337 := 4*t309;    t334 := - 1/2*1/(-eta3 + Alpha2);    t324 := x*t325;    t323 := -1 + t309 + t310 - 2*t333 + t342;    t321 := 1 + t332*t337 + t299 + Alpha1*t324 + t347*t307 + (t339 + 4)*t328 + (Alpha1*t339 + t324)*eta2 + (t336 + t337)*t312 + (t309 + t346)*t309         + (t326 + t304 + t344)*t304 + (t306 + t343)*t306 + (6*t306 + t310 + t343)*t310 + t344;    t264 := -1 + t331;    result := [[{y = (2*eta1 + t323)*t334}, {t264, t321 - t345}], [{y = eta3}, {t264, -2*t328 + t310 + t312 - t307 - t342}],        [{y = (-2*eta1 + t323)*t334}, {t264, t321 + t345}]]end proc(), {Alpha1 = cos(t1), eta3 = .995, eta2 = .575, eta1 = 1.35, Alpha2 = sin(t1)};

The above and the below is from the previous post.
Top view:

Most likely the elimination ran into trouble and substituted lesser cases(?).

## No curves?...

@cuongtd Well, what I've found was done by elimination. Oddly enough, when I converted to pure symbolic and solved again I received a solution that has NO curves, and has only points termed in the constants of the equations. The following list has complex values removed:

[x, y, cos(t1), sin(t1)] = ([1.15, -.35, .5289398012, .8486593467], [1.15, -.35, -.3352457626e-1, -.9994378934], [1.15, .35, -.3352457626e-1, .9994378934], [1.15, .35, .5289398012, -.8486593467], [0, -.35, 0, 1.], [0, .35, 0, -1.], [0, -2.35, 0, -1.], [0, 2.35, 0, 1.], [.575, 1.345, -.6440493667, .7649839300], [.575, 1.345, .9980143844, .6298641560e-1], [.575, -1.355, .9973489646, -.7276704453e-1], [.575, -1.355, -.6406294899, -.7678501525], [.575, .645, -.7749377670, .6320375442], [.575, .645, .7165251908, -.6975612166])

## Compose...

Thomas Richard already covered this, but you might lke these:

f := () -> `@`(parse, cat, op, map)(convert, [args], string);
g := (L::{list, set}) -> `@`(parse, cat, op, map)(convert, L, string);

f(100.100, 3, 3, 2, 2, 1, 1, `535`);
g([100.100, 3, 3, 2, 2, 1, 1]);

## Suspicion....

@Carl Love I was suspecting that by now Maplesoft developed a feature for this.

## More digits....

@Majmaj Since precision is your issue the last line should be with increased Digits. Pick the appropriate setting; I used 2*Digits:

moreDigits:=2*Digits;
S:=evalf(`@`(f,op,map2)(op,1,B),moreDigits),`@`(op,map2)(op,3,B);

evalf((minimize..maximize)(S),moreDigits);

or in one line:

moreDigits:=2*Digits;
evalf((minimize..maximize)(`@`(f,op,map2)(op,1,B),`@`(op,map2)(op,3,B)),moreDigits);

## Correction:...

@Majmaj My version does it differently. This should work with current version:

 vars:=a,b;Aexpr:=a*b;f:=unapply(Aexpr,vars);A:=a=.123456789,b=.123456789;B:=map(`@`([proc(r) local k; (rhs-lhs)(r)*k+lhs(r), k, k=0..1 end proc], `@`(op,shake)), subs([A], [vars]));S:=`@`(f,op,map2)(op,1,B),`@`(op,map2)(op,3,B);(minimize..maximize)(S);

What do you ge tfor value of S?

## Simplification....

From the first set I specified:
`@`(rationalize,factor,simplify)(u,[Z^2*Omega^2*a^2-k*m],[k, Z]);

gives:

The rest follows.

## Look closer....

@Markiyan Hirnyk You gave me a cause to look again. I dont recall my thoughts, so:

ee := proc() _EnvExplicit := false; op([1, 2], [eliminate](args)) end proc;
Q:=ee({P,-1+V=something},{V,Z});

#gives

Q:={4*k*m-2*Omega^2*a^2*something-Omega^2*a^2*something^2};

#and

assume(something<-2),`@`(normal,simplify)(u,Q,[k,something]);

#gives

-I

Q and something are well motivated and easier to see. So start over:

restart;
A := a, positive, k, positive, Omega, positive, m, positive, -something - 2, positive; assume(A);
Q := -4*k*m+2*Omega^2*a^2*something+Omega^2*a^2*something^2;
u:=-Omega*a*sqrt(2)*sqrt(-Omega^2*a^2-2*k*m+sqrt(Omega^2*a^2*(Omega^2*a^2+4*k*m)))/(-Omega^2*a^2+sqrt(Omega^2*a^2*(Omega^2*a^2+4*k*m)));

`@`(normal,simplify)(u,[Q],[k,something]);

#gives

-I

## Question....

What is the actual system you are trying to solve?

## Also...

consider this sample:

interface(version);
# Maple Worksheet Interface, Release 4, IBM INTEL NT, Apr 16 1996

#base:

makefn := proc(Expr, Args::list({name, name::type}))
local x, q, f;
f := subs(q = 'Expr', subsop(1 = op('Args'), setattribute(unapply(q, x))));
f := setattribute(eval(f), operator, arrow)
end:
values := proc(x::uneval) 'values'(x) end;
`type/values` := proc(a, n) evalb('a' = eval(n)) end;

#implement:

f1:=makefn('det'(m),[m::'array'(1..values(dim),1..values(dim))]);
M2:=matrix(2,2):M3:=matrix(3,3):
dim:=2;d2:=f1(M2):f1(M3):dim:=3;d3:=f1(M3):

#Results:

f1 := m::array(1 .. values(dim), 1 .. values(dim)) -> det(m)
dim := 2
Error, f1 expects its 1st argument, m, to be of type array(1 .. values(dim),1 .. values(dim)), but received M3
dim := 3

Does the above function properly in your version of Maple?

## Restraint....

@Markiyan Hirnyk The "answer" states only one thing: the restraint given has the same boundaries as another: signum((abs(x-a)-abs(x+a))*(2*abs(x-a)-1)) = 1. The regions are the same except for exclusion of x=a, due to the log base, shown in grey. Is this answer better?

Why did you edit your comment?

## Oh I see now, use bfrac instead of frac:...

bfrac:=(x->x)-floor;
F:=piecewise(x>=0 and x <= 1, x^2,x > 1 and x<=2, (2-x)^2);
f:=unapply(F,x);
plot(f,0..2,scaling=constrained);

P:=2*bfrac(x/2);
p:=(expand@unapply)(P,x);
plot(p,-8..8,scaling=constrained);
plot(f@p,-8..8,scaling=constrained);

Q:=unapply('q*(bfrac@((x->x)/q)),q');
p:=Q(2);
plot(f@p,-8..8,scaling=constrained,color=blue);
plot([f@Q(2),f@Q(4)],-8 .. 8,color = [khaki, black],thickness = [3, 0],numpoints = 101,axes=boxed,scaling=constrained);

 4 5 6 7 Page 6 of 7
﻿