Kitonum

13347 Reputation

24 Badges

11 years, 66 days

MaplePrimes Activity


These are answers submitted by Kitonum

Maple does not implement the solution of irrational inequalities with parameters. Here is a simpler example:

solve(sqrt(x-a)<x, x);

              Warning, solutions may have been lost

To calculate the values of derivatives of any order at a point, use  D  instead of  diff :

f:=x->x^2:
sum((D@@k)(f)(0), k=1..2);

 

As a workaround, use exact arifmetic:

answer := 5*exp(15/2*t);
response := subs(a = exp(1), 5*a^(15/2*t));
a := subs(t = Pi, answer);
b := subs(t = Pi, response);
simplify(a-b);

 

In order for Maple to solve this example step by step, we need to help it a little. To do this, first make the change  x=sin(t) . Maple shows a step-by-step solution, and in the end we do the inverse change and final simplification for a multiple argument:

A:=Int(x^2 * sqrt(1-x^2), x):
B:=IntegrationTools:-Change(A, x=sin(t));
Student:-Calculus1:-ShowSolution(B);
subs(t=arcsin(x), -(1/32)*sin(4*t)+(1/8)*t);
expand(%);

 

U:={1,2,3,4,5,6,7,8,9,10}:
A:={1,2,3,4}:
B:={4,5,6,7}:
C:={8,9,10}:
U minus C;

# Or in prefix notation
`minus`(U,C);


See the help page  Sets and Lists

If you already know the desired final result, then the easiest way is:

simplify(sin(4*Pi*w)/sin(2*Pi*w) - 2*cos(2*Pi*w));

Output :            0


The commands proposed in other answers are selected based on the already known result.
            

As an alternative you can use a  for-loop .

In the example below - the simplest way to plot the Pascal triangle:

N:=10:
for n from 0 to N do seq(binomial(n,k), k=0..n) od;


Acer's method does the same but the code is shorter a little:

N:=10:
seq(print(seq(binomial(n,k), k=0..n)), n=0..N);


 

 

plots:-intersectplot(x^2+y^2+z^2=1,x+y+z=0, x=-1..1, y=-1..1, z=-1..1);

This behavior seems like a bug. Here is a workaround:

sol_2:=subs(_C1=C[1], sol_1):
simplify(eval(ode, [sol_2, sol_2^2])) ;
                               
 0=0

restart;
A:=((y*sqrt(3) + 3)*sqrt(3))/(6*sqrt(y^2 + 1));
B:=(y + sqrt(3))/(2*sqrt(y^2 + 1));
	
expand(arctanh(A)-arctanh(B));

Output:        
                              0


 

I understood the  "identify"  word as the need to collect identical objects into separate groups (lists). The code below does this:

restart;
Eq1:=5.09295817894067*`&tau;u`[1, 1]-30.5577490736439*`&tau;u`[2, 1]+178.253536262923*`&tau;u`[3, 1]-30.5577490736439*`&tau;u`[1, 2]+183.346494441862*`&tau;u`[2, 2]-1069.52121757753*`&tau;u`[3, 2]+178.253536262923*`&tau;u`[1, 3]-1069.52121757753*`&tau;u`[2, 3]+6238.87376920228*`&tau;u`[3, 3]:
Eq2:=5.09295817894067*`&tau;u`[1, 1]+10.1859163578814*`&tau;u`[2, 1]+15.2788745368241*`&tau;u`[3, 1]-30.5577490736439*`&tau;u`[1, 2]-61.1154981472883*`&tau;u`[2, 2]-91.6732472209439*`&tau;u`[3, 2]+178.253536262923*`&tau;u`[1, 3]+356.507072525849*`&tau;u`[2, 3]+534.760608788841*`&tau;u`[3, 3]-3/7:
Eq3:=5.09295817894067*`&tau;u`[1, 1]-30.5577490736439*`&tau;u`[2, 1]+178.253536262923*`&tau;u`[3, 1]+10.1859163578814*`&tau;u`[1, 2]-61.1154981472883*`&tau;u`[2, 2]+356.507072525849*`&tau;u`[3, 2]+15.2788745368241*`&tau;u`[1, 3]-91.6732472209439*`&tau;u`[2, 3]+534.760608788841*`&tau;u`[3, 3]-9/7:
Eq4:=5.09295817894067*`&tau;u`[1, 1]+10.1859163578814*`&tau;u`[2, 1]+15.2788745368241*`&tau;u`[3, 1]+10.1859163578814*`&tau;u`[1, 2]+20.3718327157631*`&tau;u`[2, 2]+30.5577490736484*`&tau;u`[3, 2]+15.2788745368241*`&tau;u`[1, 3]+30.5577490736484*`&tau;u`[2, 3]+45.8366236104784*`&tau;u`[3, 3]-12/7:
Eq5:=5.09295817894067*`&tau;u`[1, 1]-30.5577490736439*`&tau;u`[2, 1]+178.253536262923*`&tau;u`[3, 1]+50.9295817894067*`&tau;u`[1, 2]-305.577490736439*`&tau;u`[2, 2]+1782.53536262923*`&tau;u`[3, 2]+504.202859715131*`&tau;u`[1, 3]-3025.21715829077*`&tau;u`[2, 3]+17647.1000900295*`&tau;u`[3, 3]-18/7:
Eq6:=5.09295817894067*`&tau;u`[1, 1]+10.1859163578814*`&tau;u`[2, 1]+15.2788745368241*`&tau;u`[3, 1]+50.9295817894067*`&tau;u`[1, 2]+101.859163578814*`&tau;u`[2, 2]+152.788745368241*`&tau;u`[3, 2]+504.202859715131*`&tau;u`[1, 3]+1008.40571943027*`&tau;u`[2, 3]+1512.60857914560*`&tau;u`[3, 3]-3:
Eq7:=5.09295817894067*`&tau;u`[1, 1]+10.1859163578814*`&tau;u`[2, 1]+15.2788745368241*`&tau;u`[3, 1]-30.5577490736439*`&tau;u`[1, 2]-61.1154981472883*`&tau;u`[2, 2]-91.6732472209439*`&tau;u`[3, 2]+178.253536262923*`&tau;u`[1, 3]+356.507072525849*`&tau;u`[2, 3]+534.760608788841*`&tau;u`[3, 3]-3/7:
Eq8:=5.09295817894067*`&tau;u`[1, 1]+10.1859163578814*`&tau;u`[2, 1]+15.2788745368241*`&tau;u`[3, 1]+10.1859163578814*`&tau;u`[1, 2]+20.3718327157631*`&tau;u`[2, 2]+30.5577490736484*`&tau;u`[3, 2]+15.2788745368241*`&tau;u`[1, 3]+30.5577490736484*`&tau;u`[2, 3]+45.8366236104784*`&tau;u`[3, 3]-12/7:
Eq9:=41.7622570673196*`&tau;u`[3, 1]+41.7622570673196*`&tau;u`[1, 3]+15.2788745368220*`&tau;u`[1, 1]+83.5245141346398*`&tau;u`[2, 3]+30.5577490736443*`&tau;u`[2, 1]+113.063671572516*`&tau;u`[3, 3]+83.5245141346398*`&tau;u`[3, 2]+30.5577490736443*`&tau;u`[1, 2]+61.1154981472892*`&tau;u`[2, 2]:

S:=[seq([i,Eq||i], i=1..9)];
S1:=[ListTools:-Categorize((u,v)->u[2]=v[2], S)];
map(t->op~(1,t), S1);
op(select(t->nops(t)>1, %));

The final result:     
                                    [2, 7], [4, 8]


If you just need to remove duplicates, then do

{seq(Eq||i, i=1..9)};

 

If we divide the total area of all the necessary pieces of plywood into the area of 1 standard plywood sheet  48*96=4608, we get about 2.56. Thus, at least 3 standard sheets are required. I just cut out proportional sized pieces of paper and in 10 minutes I found the right solution. Thus, 3 standard sheets are needed. All calculations and visualization are below. For ease of identification, pieces of the same size are painted in the same color. All sizes are in inches.

restart;

4 - "40.625 x 20" - green
2 - "36 x 20" - blue
2 - "34.75 x 20" - khaki
3 - "33.75 x 12" - cyan
6 - "18.825 x 12" - red
3 - "32.5 x 12" - pink
3 - "33.75 x 19.5" - gold

S[0]:=48*96; S[1]:=40.625*20; S[2]:=36*20; S[3]:=34.75*20; S[4]:=33.75*12; S[5]:=18.825*12; S[6]:=32.5*12; S[7]:=33.75*19.5;
L:=[4,2,2,3,6,3,3];
add(L[i]*S[i], i=1..7)/S[0];

4608

 

812.500

 

720

 

695.00

 

405.00

 

225.900

 

390.0

 

658.125

 

[4, 2, 2, 3, 6, 3, 3]

 

2.559629991

(1)


Code for a visualization

with(plottools): with(plots):
Colors:=[green,blue,khaki,cyan,red,pink,gold,yellow]:

A1:=rectangle([0,20],[40.625,0], color=Colors[1]):
A2:=rectangle([0,20+20],[40.625,20], color=Colors[1]):
A3:=rectangle([0,20+40],[40.625,40], color=Colors[1]):
A4:=rectangle([0,20+60],[40.625,60], color=Colors[1]):
A5:=rectangle([0,20*4+12],[33.75,0], color=Colors[4]):
A:=polygon([[40.625,0],[48,0],[48,96],[0,96],[0,92],[33.75,92],[33.75,80],[40.625,80]], color=Colors[8]):
T1:=textplot([[20,10,"40.625 x 20"],[20,30,"40.625 x 20"],[20,50,"40.625 x 20"],[20,70,"40.625 x 20"],[17,85,"33.75 x 12"]], font=[times,14]):
A11:=display(seq(A||k,k=1..5),A,T1):

B1:=rectangle([0,34.75],[20,0], color=Colors[3]):
B2:=rectangle([20,34.75],[32,1], color=Colors[4]):
B3:=rectangle([32,34.75],[44,1], color=Colors[4]):
B4:=rectangle([0,34.75+33.75],[19.5,34.75], color=Colors[7]):
B5:=rectangle([19.5,34.75+33.75],[19.5*2,34.75], color=Colors[7]):
B6:=rectangle([0,34.75+33.75+19.5],[33.75,34.75+33.75], color=Colors[7]):
B7:=rectangle([33.75,34.75+33.75+18.825],[33.75+12,34.75+33.75], color=Colors[5]):
B:=polygon([[20,0],[48,0],[48,96],[0,96],[0,34.75+33.75+19.5],[33.75,34.75+33.75+19.5],[33.75,34.75+33.75+18.825],[33.75+12,34.75+33.75+18.825],[33.75+12,34.75+33.75],[19.5*2,34.75+33.75],[19.5*2,34.75],[44,34.75],[44,1],[20,1]], color=Colors[8]):
T2:=textplot([[70,18,"34.75 x 20",'rotation' = (1/2)*Pi],[70,50,"33.75 x 19.5",'rotation' = (1/2)*Pi],[85,50,"33.75 x 19.5",'rotation' = (1/2)*Pi],[77,80,"33.75 x 19.5"],[86,18,"33.75 x 12",'rotation' = (1/2)*Pi],[97,18,"33.75 x 12",'rotation' = (1/2)*Pi],[100,77,"18.825 x 12",'rotation' = (1/2)*Pi]], font=[times,14]):
B11:=display(translate(display(seq(B||k,k=1..7),B),60,0),T2):

C1:=rectangle([0,32.5],[12,0], color=Colors[6]):
C2:=translate(C1,12,0):
C3:=translate(C1,24,0):
C4:=rectangle([36,18.825],[48,0], color=Colors[5]):
C5:=seq(translate(C4,0,18.825*k), k=1..4):
C6:=rectangle([0,52.5],[36,32.5], color=Colors[2]):
C7:=translate(C6,0,20):
C8:=rectangle([0,92.5],[34.75,72.5], color=Colors[3]):
C:=polygon([[0,92.5],[34.75,92.5],[34.75,72.5],[36,72.5],[36,96-18.825*5],[48,96-18.825*5],[48,96],[0,96]], color=Colors[8]):
T3:=textplot([[126,16,"32.5 x 12",'rotation' = (1/2)*Pi],[138,16,"32.5 x 12",'rotation' = (1/2)*Pi],[150,16,"32.5 x 12",'rotation' = (1/2)*Pi],seq([164,9+18.825*k,"18.825 x 12",'rotation' = (1/2)*Pi],k=0..4),[138,42,"36 x 20"],[138,62,"36 x 20"],[138,84,"34.75 x 20"]], font=[times,14]):
C11:=display(translate(display(seq(C||k,k=1..8),C), 120,0),T3):

display(A11,B11,C11, scaling=constrained, size=[950,540], axes=none);

 

 

 

                 

Plywood1.mw  

Use the  isolve  command for this:


 

eq1 := [isolve({2*m-5 < 0, -3*m <= 5})]

[{m = -1}, {m = 0}, {m = 1}, {m = 2}]

(1)

nops(eq1)

4

(2)

``

``

eq2 := [isolve({m-3 < 0, -m <= 6})]

[{m = -6}, {m = -5}, {m = -4}, {m = -3}, {m = -2}, {m = -1}, {m = 0}, {m = 1}, {m = 2}]

(3)

nops(eq2)

9

(4)

``

 

Addition. Unfortunately,  isolve  command is not effective enough and quite often (in more difficult situations) it does not cope with the task of finding integer points. On this occasion, look at these 2 posts:  https://www.mapleprimes.com/posts/202437-Integer-Points-In-Polyhedral-Regions  and  https://www.mapleprimes.com/posts/202542-Integer-Points-In-Curved-Regions

 

Download help_list_integer_equation_new.mw

This is the standard integer linear programming problem. See wiki  https://en.wikipedia.org/wiki/Cutting_stock_problem 

See also  How do I solve Cutting Stock Problem in Maple - MaplePrimes 

We project points  C  and  D  on the plane of the base of the cylinder. We get points  C'  and  D' . Obviously  ABC'D'  is a rectangle. For the origin we take the center of this rectangle, we direct the  x axis through the middle of  AB, and the  y axis through the middle of  BC' . Let  AB = a  and  C'B=b .  To find  a  and  b , we have a simple system of two equations with 2 unknowns. We solve it with Maple:

solve({a^2+b^2=6^2, b^2+2^2=a^2, a>0, b>0});

               {a = 2*5^(1/2),  b = 4}

Further finding the coordinates of all points is obvious.

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