Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

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.

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

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

 

Thumb if you like.

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?


 

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
 

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.

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);

 

{x1and0<xorx0or1<xandx<aa<3x1and0<xor1<xandx<a3aanda<1x1and0<x1aanda0a<xandx<10<aanda<1false1a

 


Hope this suffices. Thumb if You like.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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 "function_coeffs" in this post:
https://www.mapleprimes.com/questions/209926-How-To-Extract-Symbolic-Coefficient#answer225361

It is intended precisely for your task. Example:
P:=randpoly({sin(x),cos(x),sin(z),tan(y),1});
function_coeffs(P,{x});


Thumb if you like.

 

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

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.

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.

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.

A pure algebraic equation. You should try it with Groebner package:

S:={ x^2=2, x^3=2*sqrt(2) } ;
Groebner:-Solve(map(lhs-rhs, S));

Thumb if you like.

1 2 3 4 5 6 7 Page 1 of 7