Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

I do not really understand what you are saying so my question follows:
 

We can indentify any point P using: P = [x, y, c]; where c is the color and (x,y) is the coordinate in the plane.
We have a rule: For all ( P[1] = [x[1], y[1], c[1]], P[2] = [x[2], y[2], c[2]] ) (c[1]=c[2]) implies not (y[1]=y[2]).
An observation: for every set of points satisfying above rule, the cardinality of (subset of points) having only particular (y, c) coordinates is not greater than 1.

You've given us a set of 63 points, call it set S. Which are you trying to do:
1) choose a subset of S that satisifies the rule
2) partition S into subsets satisfying the rule

[{x = 4, x = 5, x = 6, x = 7, x = 2, x = 3, x = 1}, {y = 1, c = 1}], [{x = 4, x = 5, x = 6, x = 7, x = 2, x = 3, x = 1}, {c = 2, y = 2}], [{x = 4, x = 5, x = 7, x = 1}, {c = 3, y = 3}], [{x = 4, x = 5, x = 7, x = 1}, {y = 4, c = 3}], [{x = 6, x = 2, x = 3}, {c = 4, y = 3}], [{x = 6, x = 2, x = 3}, {y = 4, c = 4}], [{x = 5, x = 7, x = 3, x = 1}, {c = 5, y = 5}], [{x = 5, x = 7, x = 3, x = 1}, {y = 6, c = 5}], [{x = 4, x = 6, x = 2}, {c = 6, y = 6}], [{x = 4, x = 6, x = 2}, {c = 6, y = 5}], [{x = 7, x = 2, x = 1}, {c = 7, y = 9}], [{x = 7, x = 2, x = 1}, {c = 7, y = 7}], [{x = 7, x = 2, x = 1}, {c = 7, y = 8}], [{x = 5, x = 3}, {c = 8, y = 7}], [{x = 5, x = 3}, {c = 8, y = 8}], [{x = 5, x = 3}, {c = 8, y = 9}], [{x = 4, x = 6}, {c = 9, y = 8}], [{x = 4, x = 6}, {c = 9, y = 7}], [{x = 4, x = 6}, {c = 9, y = 9}];
 

My one bet is the OP is looking for this:

X := x, y;
V := x^4, x^3*y, x^2*y^2, x*y^3, y^4;
P := (-x+sqrt(3)*y)/2,(-sqrt(3)*x-y)/2;
VP := expand(unapply([V], X)(P));
map(proc(E) local C, W; C := coeffs(E, {x, y}, 'W'); subs( [W] =~ [C], ({V} minus {W}) =~ 0,  [V]) end, VP);

You can simply solve for J and use that, no need for recursion.

J=(n->(2*(n-2^(ilog[2](n)))+1));

Can you prove the formula?
 

I would suspect the reason is you are not using diff and mtaylor does. So try this code:

restart;
f := (x,y) -> 1/(2 + x*y^2):
P := proc(x,y,x0,y0,N) local p,q; options operator, arrow;  add(1/factorial(n)*add(binomial(n,k)*subs(p=x-x0,q=y-y0,diff(f(p,q),[p$(n-k),q$k])*p^(n-k)*q^k), k=0..n), n=0..N): end;
P(x,y,x0,y0,30):
 

Maple 5.4 says:

Int(ln(2^(1/2)*t^(1/2))*exp(-t),t = 0 .. infinity) = 1/2*ln(2)-1/2*gamma;

This code creates a polynomial in x,y,z of degree 8:

 

f := proc(V, d) local n; map(mul, combinat[choose]([1$d, op(map(`$`, V, d))], d)) end;
L := f([x, y, z], 8);
add(c[i] * L[i], i = 1..nops(L));

 

Modify as needed.

You're obviousy thinking of surd. Look at the following:
surd(x,3) assuming x, real;

it will give you:
signum(x)*abs(x)^(1/3);

Try this code:

 

restart;
rec:=collect(solve({2*(k+1)*X(k+1)+(k+1)*Y(k+1)-X(k)-Y(k)+(1)/k!,(k+1)*X(k+1)+(k+1)*Y(k+1)+2*X(k)+Y(k)+(1)/k!},{X,Y}(k+1)), [X,Y]);
eq:=map2((expand@lhs = proc(f) setattribute(f, remember) end@rhs)@map, unapply, subs(k = k-1, rec), k);
init:=X(0) = 2, Y(0) = 1;
assign(eq, init);
L:=seq([X, Y](i),i=0..20);
 

((x->x), (content@numer)/(content@denom))((1/1296)*cBooP0-(1/1296)*cSRP0-(1/1296)*tStartRamp*f__SR/N);
proc(x,y) ``(x)*y end((%[1]/%[2]),%[2]);

 

This is for printing purposes only. Expansion will always occur when multiplying by a rational. More options in ?content

I think this is the plot of your function (Int(1/sqrt(sin(x0)-sin(x)),x=0..x0)):

plot([arcsin(s), 2*EllipticF(sqrt(s)/sqrt(s+1), I*sqrt(-s^2+1)/(-1+s))/sqrt(1-s), s = 0 .. 1], view = [0 .. Pi/2, 0 .. 5]);

#and another one (edit):

plot([arcsin(2*t^2-1), sqrt(2)*(EllipticK(t)-EllipticF(sqrt(2)/(2*t), t)), t = sqrt(2)/2 .. 1], view = [0 .. Pi/2, 0 .. 5]);

Perhaps you can use this definition to invert your function.

proc(P, V, f) local l; zip(f, [coeffs](P, V, 'l'), [l]) end(14*c^4 + 84*c^3*d + 180*c^2*d^2 + 165*c*d^3 + 55*d^4 + 5*c^3 + 21*c^2*d + 28*c*d^2 + 12*d^3 + 2*c^2 + 5*c*d + 3*d^2 + c + d + 1, [c,d], (p,q) -> `if`(degree(q, [c, d])=3, [p, q], NULL));


This is not a complete solution but you will find it useful:

 

A := cos(2*Pi*(x+y-2*z))+cos(2*Pi*(y+z-2*x))+cos(2*Pi*(z+x-2*y)) = 0;
B := {0 <= x, x <= 1, y <= 1, z <= 1, x < y, y < z};
V := [op](map2(op, 1, indets(A, trig)));
E0 := [n || ($1..3)] =~ V;
E := eliminate(E0, {x, y, z, n1});
A2 := add(cos(n), n = factor(subs(E[1], V)));
S := subs(E[1], B);

solve(S, {n2, n3});

solve(A2, {n2, n3});
#solve(A2, {n2, n3}, allsolutions=true);


Thumb if you like.

I believe this code is satisfactory for this task:

 

F := proc ()
local S, E, L, Lexc, Linc, i, s;
E, S := selectremove(type, {args}, identical({}));
L := [op](S);
S := NULL;
for i to nops(L) do
   Linc, Lexc := selectremove(member, L[i], `union`(S));
   if Linc = {} then S := S, Lexc
      else S := seq(
         proc ()
            local X;
            X := [`intersect`, `minus`](s, Linc);
            if X[1] = {} then E := {{}} end if;
            op(remove(type, X, identical({})))
         end proc(),
         s = [S]), `if`(Lexc <> {}, Lexc, NULL)
   end if
end do;
op(`union`({S},E))
end proc;


 

But I still am wondering if there is existing Maple function to carry out calculation of this combinatorial problem.

I would attempt this:

 

Sol[1] := {solve}(sys, vars, explicit = false):
Sol[2] := factor(map(proc(E, S) solve(E union {b <> c, 0 < a^2 - b^2 + c^2}, vars, useassumptions = true, tryhard = false, explicit = true) assuming b::real, a::real, c::real, b <> c, 0 < a^2 - b^2 + c^2; end proc, Sol[1])):
Cases := Sol[2]:
for j do
td := Cases;
for i in Cases do td := map(proc(S, T) if evalb((S intersect T) = {}) then S else S intersect T, S minus T end if; end proc, td, i) end do;
if td = Cases then break else Cases := td end if;
print(j);
end do:
print(nops(Cases));

for j from 3 by -1 to 1 do print(op(select(nops = j, Cases))) end do;


Every subcase statement is a selection from these 90 statements.

 

Thumb if you like.

You should familiarize yourself with Maple's evaluation rules first. B(4) is a function call. The result of a call (or the assignment) will be respresented without further valuation. To see this in action inject this print command before the fsolve:

 

print(B(4) = eval(B(4)));
A(p) := fsolve(B(4), x, ':-complex');


Replace B(4) with eval(B(4)).


Thumb if you like.

2 3 4 5 6 7 8 Last Page 4 of 20