## 874 Reputation

15 years, 26 days

## MaplePrimes Activity

### These are answers submitted by Christian Wolinski

#1:
L := [[1,2,3],[7,8,9],[13,12,11]] ;
map2(op, 3, L);

## Consider this code:...

```F := proc (R0, M, K) local X, Y, beta; unapply([(M*X + R0)*cos(beta*K), (M*X + R0)*sin(beta*K), M*Y], X, Y, beta) end proc;
f := F(1, 1, (Pi/2)/0.5);
A := U[1,6](x, theta);
cylinderplot(A - 0.1, theta = 0..2*Pi, x = 0..0.5, grid = [50,50], transparency = 0.3, scaling = constrained);
plottools[transform](f)(%);
```

Thumb if you like.

## Windows....

I believe there is a Windows setting that controls the presentation of numbers. Could it be this control affects Maple too?

## Change the sqrt....

The reason for this is the sqrt command. Instead use ^(1/2).

Thumb if you like.

## Introduce substitution...

and you can obtain the following form of your system:

{p^3*c[2]+p^2*q*c[1]+p*q^2*c[2]+q^3*c[1]-p*c[4], -p^3*c[1]+p^2*q*c[2]-p*q^2*c[1]+q^3*c[2]-q*c[4]};

Quite straightforward from here.

What do you want to do exactly with this?

## Not automated....

There are no automatic simplifications for this as the number of choices is simply too great. Every conversion you use will be a procedure written in Maple by you. Personally I like this form:

-beta*(2*lambda^2+(mu+2*lambda)*mu)*(2*lambda+nu)+((mu+2*lambda)*(2*lambda+nu)*(-1+c)-beta*mu)*mu^2;

To clarify, the above is the second formula given in the post:

((2*c-2)*lambda-beta+nu*(-1+c))*mu^3+(2*(lambda*(-1+c)-(1/2)*beta))*(2*lambda+nu)*mu^2-2*beta*lambda*(2*lambda+nu)*mu-2*lambda^2*beta*(2*lambda+nu);

Edit:

Here is a simplified version of the first formula:

(1/2)*(((mu^2+(2*lambda+mu)^2)*(2*lambda+nu)+2*mu^3)*beta-2*(2*lambda+nu)*mu^2*(2*lambda+mu)*(c-1))*sigma+(2*lambda+nu)*beta*mu^2*c*(2*lambda+mu);

The above is mmcdara's S0:

 S0 := 4*beta*c*lambda^2*mu^2+2*beta*c*lambda*mu^3+2*beta*c*lambda*mu^2*nu+beta*c*mu^3*nu-4*c*lambda^2*mu^2*sigma-2*c*lambda*mu^3*sigma-2*c*lambda*mu^2*nu*sigma-c*mu^3*nu*sigma+4*beta*lambda^3*sigma+4*beta*lambda^2*mu*sigma+2*beta*lambda^2*nu*sigma+2*beta*lambda*mu^2*sigma+2*beta*lambda*mu*nu*sigma+beta*mu^3*sigma+beta*mu^2*nu*sigma+4*lambda^2*mu^2*sigma+2*lambda*mu^3*sigma+2*lambda*mu^2*nu*sigma+mu^3*nu*sigma

Thumb if you like.

So what you are doing is this:

```V := f[0], f[2];

fn_U := unapply(U, V, a, nu);

Eq_U := [D[1], D[2]](fn_U)(V, b, 1/3);

solve(Eq_U, [V]);```

You should copy and paste your definition of U to this thread.

## A solution....

I managed to reduce the problem statement into a boolean expression with parameter a using some manipulation and SolveTools:-SemiAlgebraic.

`piecewise(a < -3,x <= 1 and 0 < x or x <= 0 or 1 < x and x < -a,-3 <= a and a < -1,x <= 1 and 0 < x or 1 < x and x < -a,-1 <= a and a <= 0,x <= 1 and 0 < x,0 < a and a < 1,a^(1/2) < x and x < 1,1 <= a,false);`

$\left\{\begin{array}{cc}{x}\le {1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}<{x}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}or\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{x}\le {0}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}or\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{1}<{x}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{x}<-{a}& {a}<-{3}\\ {x}\le {1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}<{x}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}or\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{1}<{x}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{x}<-{a}& -{3}\le {a}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{a}<-{1}\\ {x}\le {1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}<{x}& -{1}\le {a}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{a}\le {0}\\ \sqrt{{a}}<{x}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{x}<{1}& {0}<{a}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}and\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{a}<{1}\\ {\mathrm{false}}& {1}\le {a}\end{array}$

Hope this suffices. Thumb if You like.

## The solution is as jagged as is the plot...

Use this code:

```
f := (x) -> piecewise(x <= 0, -3, 0 < x and x <= 1, x^2, -x);
e := a < f(x);
c := table([1 = (x <= 0), 2 = (0 < x and x <= 1), 3 = (1 < x)]);
d := (() -> ({e assuming args}, solve({args}, {x}))) ~ (c);
s := (() -> SolveTools:-SemiAlgebraic(`union`(args), [a, x])) ~ (d);
solution := (op@op) ~ ([entries](s));
plot(f, -4..4, labels=[x, 'f(x)'], axes = boxed, discont = true, scaling=constrained);
```

```
plots[display](
[seq(
plots[display]([
plot(f, -4..4, discont = true, thickness = 2, transparency = 0.75),
plots:-inequal(S, x = -4..4, a = -4..2, color = grey, transparency = 0.5, thickness = 1)]
),
S = solution)],
labels=["x", "a"], axes = boxed,  scaling=constrained, insequence = true);
```

Thumb if You like.

## You may want to try the function "f...

You may want to try the function "function_coeffs" in this post:

P:=randpoly({sin(x),cos(x),sin(z),tan(y),1});
function_coeffs(P,{x});

Thumb if you like.

## Does this work for you?...

combine(convert(f,tanh)) assuming tanh(x)>0;

## A very reserved process....

Consider these codes:

```assume(a1, real, a2, real, b1, real, b2, real, a3 = a1 - a2, b3 = b1 - b2);
is(a1 - a2, real), is(b1 - b2, real);
is((a1 - a2)^2 + (b1 - b2)^2 >= 0);
is(a3, real), is(b3, real);
is(a3^2 + b3^2 >= 0);```

and

```assume(a1, real, a2, real, b1, real, b2, real, a3 = a1 - a2, b3 = b1 - b2, a3, real, b3, real);
is(a1 - a2, real), is(b1 - b2, real);
is((a1 - a2)^2 + (b1 - b2)^2 >=0);
is(a3^2 + b3^2 >= 0);```

It is now plain to see "a1 - a2 is real" (or "a3 is real") is not a statement generated by the is/assume facility (1st code). This is because "(a1 - a2)^2" is never idealized. I believe the derivation "Polynomial P -> Sum of arbitrary polynomials" is not done, but for the explicit case that is the P = sum of (expanded) P's monomials. I expect P = sum positive multiples of even powers of reals would be identified nonnegative. The query you are trying to implement is a broadstroke. The is/assume facility acts much reserved in such cases.

## Assumption....

There is a typo and also your assumptions are improperly declared.

 A := 0 < T, 0 < tau, 0 < beta, 0 < N, 0 < k, 0 < nu, k < N, m < N, beta <= 1, 0 < n; assume(A); EQ := rho1^k*beta^k = (N*beta*rho2-N-1+((-2*N*beta^2+N*beta)*rho2+2*N*beta-N+2*beta+((N*beta^3-N*beta^2)*rho2-N*beta^2+N*beta-beta^2+beta)*rho1)*rho1)/(((N-k)*rho2+((-N*beta+2*beta*k)*rho2-N+k+(-beta^2*k*rho2+N*beta-beta*k+beta)*rho1)*rho1)), rho2^k/rho2^N*beta^k = (-N-1+(2*N*beta-N+2*beta+(-N*beta^2+N*beta-beta^2+beta)*rho1)*rho1+(N*beta+(-2*N*beta^2+N*beta+(N*beta^3-N*beta^2)*rho1)*rho1)*rho2)/(((-N+k+(N*beta-beta*k+beta)*rho1)*rho1+(N-k+(-beta^2*k*rho1-N*beta+2*beta*k)*rho1)*rho2));

Do you recognize your equations in the above?

Thumb if you like.

## This worked....

I do not entirely understand why this would give the correct answer, but it works:

 A := x^2 + y^2 + z^2 - 4*x + 6*y - 2*z - 11 = 0, 2*x + 2*y - z = -18; V := x, y, z; EQ := {A} union D({A}); S := {solve}(EQ, indets(EQ, {name, function}), explicit); S := map(subs, S, [V]); S := {seq(subs(solve((map(Im, E) assuming real), {V}), E), E = S)};

Thumb if you like.

 First 7 8 9 10 11 12 13 Page 9 of 15
﻿