Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

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.

Maybe this works:

 

nmSphere := proc(L::list, x::list)
   local n, m, mu, v, F, E;
   description "Convert n distinct points:(L) in m-space:(x) into equations about (n-1)-sphere in m-space";
   n := nops(L);
   m := nops(x);
   F := map(unapply, [add(v[i]^2, i = 1 .. m), seq(v[i], i = 1 .. m), 1], v);
   E := [seq(F[i](x) - add(F[i](L[j])*mu[j], j = 1 .. n), i = 1 .. m + 2)], [seq(mu[j], j = 1 .. n)];
   eliminate(E)[2];
end proc:

nmSphere([[-1,0,0], [0,1,0], [0,0,1]], [x,y,z]);

V := [x, y, z];
P := [-1, 0, 0], [0, 1, 0], [0, 0, 1];
E := nmSphere([P], V);
S := map(subs, ([solve])(E, {x, y}, explicit), V);
R := z = (proc (R) options operator, arrow; op([1, 1], R) .. op([2, 1], R) end proc)(solve(0 < discrim(eliminate(E, {y})[2][1], x), z));

plots[display](plots[pointplot3d]([P], symbol = CIRCLE, color = red), seq(plots[spacecurve](L, evalf(R), color = grey, thickness = 3, transparency = .5), L = S), axes = boxed, scaling = constrained, orientation = [-150, 60, 60], labels = ["x", "y", "z"]);

V := [x, y];
P := [-1, 0], [0, 1], [0, 0];
E := nmSphere([P], V);
S := map(subs, ([solve])(E, {x}, explicit), V);
R := y = (proc (R) options operator, arrow; op([1, 1], R) .. op([2, 1], R) end proc)(solve(0 < discrim(E[1], x), y));

plots[display](plots[pointplot]([P], symbol = CIRCLE, color = red), plot([[S[1][], R], [S[2][], R]], color = grey, thickness = 3, transparency = .5), axes = boxed);


;;


Thumb if you like.

You are given a rational polynomial so this is the basic for Maple. Manipulate directly.

    A := - lv*(dw - lw)/(dw - hw);
    - A*(dw - hw)/(hw - dw);

But most likely you are considering an automated method. Consider the code that follows with different values of S, like [lw,dw], [dw,lw] and other.

    A := solve(hv*hw + lv*lw = dw*(lv + hv), hv);
    T := table([(i = op(i, A)) $ (i = 1 .. nops(A))]);
    T := map(proc(x) if type(x, anything^integer) then op(x) else x, 1 fi end, T);
#make changes here:
    S := [lw, dw];
    T := map(proc(x, p, S) local l; l := lcoeff(x, S); l, normal(x/l), p end, T, S);
    mul(T[i][1]^T[i][3], i = 1 .. nops(A)), mul(T[i][2]^T[i][3], i = 1 .. nops(A))

 

 

Look up:

?issqr
?isqrt

First 13 14 15 16 17 18 19 Page 15 of 21