Kitonum

19049 Reputation

26 Badges

14 years, 141 days

MaplePrimes Activity


These are answers submitted by Kitonum

Colors are encoded as integers from 1 to 5.

restart;
L:=[seq(i$4, i=1..5)]:
P:=combinat:-permute(L,4):
k:=0:
for p in P do
if p[1]<>p[2] and p[2]<>p[3] and p[3]<>p[4] and p[4]<>p[1] 
then k:=k+1 fi;
od: 
k;

                                                                       260

Since  C=Pi-A-B , we have the problem of finding the minimum (or maximum) of a continuous function of two variables in a closed bounded area (this is a triangle  EFG  in the figure below). mmcdara showed that this function has no critical points in this region, so the minimum (or maximum) is necessarily reached at the boundary of the region. Therefore, the problem is reduced to finding the minimum of a function of one variable on the segments  EG, EF  and  FG .

The worksheet is not loading for some reason, so see the link below.

We see that the minimum is equal to 1/4 and is reached at the points  E(Pi/3, Pi/3)  and  G(Pi/2, Pi/4) , but if  A<Pi/2 , then only at the point  E .
 

Download problem.mw

restart;
P:=map(p->convert(p,Matrix,3,3), combinat:-permute([0$9,1$9],9)):
n:=0:
for p in P do
S:=convert~([p[1],p[2],p[3],p[..,1],p[..,2],p[..,3]],set);
if andmap(t->{0,1} subset t, S) then n:=n+1 fi;
od:
n;

                                                                    102

Unfortunately, Maple doesn't think to simplify the sum of the first and third terms after the simplification, but we can tell him to do so:

restart;
Expr:=G1*P3 + G1*P5 + G1*P6 + G2*P3 + G2*P6 + G3*P2 + G3*P5 + G4*P2 + G4*P3 + G4*P5 + G4*P6 + G5*P2 + G5*P3 + G5*P5 + G5*P6 + G6*P3 + G6*P6 + G7*P2 + G7*P5 + G8*P2 + G8*P3 + G8*P5 + G8*P6;
Expr1:=simplify(Expr);
L:=[op(Expr1)]:
t:=op(1,L)+op(3,L):
factor(t)+simplify(Expr-t); # The final result

G1*P3+G1*P5+G1*P6+G2*P3+G2*P6+G3*P2+G3*P5+G4*P2+G4*P3+G4*P5+G4*P6+G5*P2+G5*P3+G5*P5+G5*P6+G6*P3+G6*P6+G7*P2+G7*P5+G8*P2+G8*P3+G8*P5+G8*P6

 

(G1+G2+G4+G5+G6+G8)*P3+(G1+G3+G4+G5+G7+G8)*P5+(G1+G2+G4+G5+G6+G8)*P6+P2*(G3+G4+G5+G7+G8)

 

(G1+G2+G4+G5+G6+G8)*(P3+P6)+(G1+G3+G4+G5+G7+G8)*P5+P2*(G3+G4+G5+G7+G8)

(1)

 

Download simplification.mw

If we want the number  n  to match the number of petals, then

restart;
Rose:= (n::integer)-> plots:-polarplot(`if`(n::even,sin(n/2*t),sin(n*t)), filled, color= `if`(n::odd, pink, aquamarine)):

Rose(4);  Rose(3); # Examples

 

@mylikes  You didn't specify your version of Maple. It's probably a pretty old version if your code doesn't work. Try the two options below. The first option is the standard way to calculate the double integral. If it doesn't work, then try the second option, which reduces the double integral to a repeated one:
 

restart;
r:=-36*u^3*v*(-1 + u + v)*(3*u^2 + u*v - 5*u - 2*v + 2)/(-1 + u)^2;
int(r, [u=0..1-v, v=0..1]); # The first option
int(int(r, u=0..1-v), v=0..1);  # The second option

 

Examples:

ilog10(10110)+1;
ilog10(111010110)+1;

                                                        5
                                                        9

restart;
de := plot3d(y*sin(x), x = 0 .. 2*Pi, y = -2 .. 2):
plottools:-getdata(de);

 

restart;
ell:=(9/4)*X^2+9*Y^2=1;
a:=sqrt(1/coeff(lhs(ell),X^2));
b:=sqrt(1/coeff(lhs(ell),Y^2));
max(2*a,2*b); # Major axis
min(2*a,2*b); # Minor axis

                       

 

 

 

restart;
z1:=2+3*I:
z2:=I:
op(z1);
op(z2);

                                                                         2, 3
                                                                          1

A reliable way to iterate over the sum of multiple terms is to simply make those terms elements of a list.

restart:
with(plottools): with(plots):
u:=[2,2]: v:=[2,-1]:
G1:=seq(line(-5*u+t*v,5*u+t*v,linestyle=2), t=-5..5):
G2:=seq(line(s*u-5*v,s*u+5*v,linestyle=2), s=-5..5):
U:=arrow(u, color=red, width=0.2):
V:=arrow(v, color=red, width=0.2):
plots:-display(U,V,G1,G2, size=[700,700], scaling=constrained, axes=none);
    

We have to use the  parametric  option:

restart;
solve({-x1+2*x2+(2-p)*x3=0,(2-p)*x2+x3=2, (1-p)*x1+2*x2+2*x3=p+3}, {x1,x2,x3}, parametric=true):
value(%);

   

Your syntax is correct and works successfully, but the following small improvements can be made:

1. The inequality  y>-1  can be omitted, since your region is itself above the line  y=-1 .
2. The  optionsexcluded = (color = white)  option can also be omitted, as it is done by default.
3. I equalized the ranges along the axes and shortened them a bit. With equal ranges, all shapes are unchanged and the  scaling=constrained  option is not required.

restart: with(plots):
inequal({y >= x^2+1, (x-1)^2+(y-1)^2 <= 16}, x = -3.5 .. 5.5, y = -3.5 .. 5.5, optionsfeasible = (color = grey));

       

Use the  factor  command for this:

factor(f);

                    A*sin(x)*theta(x)*(-m*omega^2+k)

1 2 3 4 5 6 7 Last Page 1 of 272