Kitonum

21430 Reputation

26 Badges

17 years, 6 days

MaplePrimes Activity


These are answers submitted by Kitonum

Use the seq command in plots:-textplot .

For some reason the worksheet doesn't open here - so I'm only providing a link to download it.

Download S7MAA_Dveloppement_Limit_new.mw

The final picture:

 

Here is my attempt to animate one of the flexible octahedrons. It is proven that all examples of such octahedrons will be self-intersecting. The intersection lines of two pairs of intersecting faces  BEC  and  AED  ( BCF  and  ADF ) are shown as dashed line. For clarity, faces  BEC  and  AED  are colored. When moving, the lengths of all 12 edges do not change. This octahedron is symmetrical with respect to the horizontal plane in which the anti-parallelogram  ABCD  lies.

restart;
A0:=[-1,0,0]: A1:=[-2,0,0]: C0:=[1,0,0]: C1:=[2,0,0]:
P:=proc(t)
local A, C, D, B, dist, E, F, P1, P2, P3, AED, BCE, S, SE, SF, T, sys;
uses plottools, plots;
A:=(1-t)*~A0+t*~A1; C:=(1-t)*~C0+t*~C1;
S:=[0,C[1],0];
D:=A+[3,3,0]; B:=C+[-3,3,0];
dist:=(X,Y)->sqrt((X[1]-Y[1])^2+(X[2]-Y[2])^2+(X[3]-Y[3])^2);
E:=[0,y,z];
sys:={dist(A,E)=sqrt(10),dist(B,E)=sqrt(10)};
E:=eval([0,y,z],solve(sys, {y,z}, explicit)[2]);
F:=[E[1],E[2],-E[3]];
P1:=curve([A,B,C,D,A], color=black, thickness=3); 
P2:=curve([A,E,D,F,A], color=black, thickness=3);
P3:=curve([B,E,C,F,B], color=black, thickness=3);
AED:=polygon([A,E,D], color="Pink");
BCE:=polygon([B,C,E], color="LightBlue");
T:=textplot3d([[A[],"A",align=[left,below]],[B[],"B",align=left],[C[],"C",align=right],[D[],"D",align=[right,above]],[E[],"E",align=above],[F[],"F",align=below],[S[],"S",align=[left,above]]], font=[times,20], align=left);
SE:=line(S,E, linestyle=dash, thickness=3);
SF:=line(S,F, linestyle=dash, thickness=3);
display(P1,P2,P3,SE,SF,AED,BCE,T);
end proc:

T1:=plots:-animate(P,[t], t=0..1, frames=45, orientation=[-100,80], axes=none, labels=[x,y,z]):
T2:=plots:-animate(P,[t], t=1..0, frames=45, orientation=[-100,80], axes=none, labels=[x,y,z]):
plots:-display([T1,T2], insequence);

                    

flexible_octahedron2.mw

Below is another solution to the problem. See my procedure  Partition    https://mapleprimes.com/posts/200677-Partition-Of-An-Integer-With-Restrictions . For ease of use, I have included the text of this procedure (slightly modified) in my answer.

restart;
Partition:=proc(n::nonnegint, k::{posint,range}, res::{range, nonnegint} := 1, S::set:={$0..n})  # Generates a list of all partitions of an integer n into k parts
local res1, k_Partition, n1, k1, L;
if type(args[-1],set) and S[1]=0 then res1:=0 else res1:=res fi;
k_Partition := proc (n, k::posint, res1, S)
local m, M, a, b, S1, It, L0;
m:=S[1]; M:=S[-1];
if res1::nonnegint then a := max(res1,m); b := min(n-(k-1)*a,M)  else a := max(lhs(res1),m); b := min(rhs(res1),M) fi;
S1:={$a..b} intersect S;
if b < a or b*k < n or a*k > n  then return [ ] fi;
It := proc (L)
local m, j, P, R, i, N;
m := nops(L[1]); j := k-m; N := 0;
for i to nops(L) do
R := n-`+`(op(L[i]));
if R <= b*j and a*j <= R then N := N+1;
P[N] := [seq([op(L[i]), s], s = {$ max(a, R-b*(j-1)) .. min(R, b)} intersect select(t->t>=L[i,-1],S1) )] fi;
od;
[seq(op(P[s]), s = 1 .. N)];
end proc;
if k=1 then [[b]] else (It@@(k-1))(map(t->[t],S1))  fi;
end proc;
if k::posint then return k_Partition(n,k,res1,S) else n1:=0;
for k1 from lhs(k) to rhs(k) do
n1:=n1+1; L[n1]:=k_Partition(n,k1,res1,S)
od;
L:=convert(L,list);
[seq(op(L[i]), i=1..n1)] fi;
end proc:

Partition(8,3,{0,1,4,6,8,9});

[[0, 0, 8], [0, 4, 4], [1, 1, 6]]

(1)

Partition(100,15,{0,1,4,6,8,9});
nops(%);

[[0, 0, 0, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [0, 0, 0, 4, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9,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, 9, 9, 9, 9], [4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 8, 8, 8, 9, 9], [4, 4, 4, 4, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8], [4, 4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 9, 9, 9, 9], [4, 4, 4, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 9, 9], [4, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8], [4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 9, 9, 9, 9], [4, 4, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 9, 9], [4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8], [4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 9, 9, 9, 9], [4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 9, 9], [4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 9, 9], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8]]

 

129

(2)
 

 

Download partition1.mw

Try

convert(2.263681592*10^(-6)*Unit(m^3/s), units, Unit(mL/min));

                                           

I think this equation should be considered as the equation with the unknown  x  and the parameter  n . For this purpose, the solve command has the parametric option. But Maple is weak in working with parameters, this option only works with polynomial equations (in your equation, the parameter is in the exponent). See your example below and an example with a simple equation of degree 1.

restart;
solve(x^n=0, x, parametric);

Error, (in SolveTools:-Parametric) invalid input: non-polynomial equations are not supported

 

solve(a*x=b, x);
solve(a*x=b, x, parametric);

 

 

(1)
 

 

Download parameter.mw

In  Mathematica , to work with parameters, you should use the  Reduce  command, not the  Solve one:

To reasonably find all integer solutions of the first equation, we first rewrite it in the form  tan(3*Pi/x) + 4*sin(2*Pi/x) = sqrt(x) . Note that for  x>=12  ​​the left side decreases and the right side increases and for  x=12  the right side is greater than the left side. This means that all real roots of this equation (not necessarily integer roots) can only exist in the interval  (0, 12) . Similarly, for the second equation we obtain the interval  (0, 37) . Therefore, all integer roots can be easily found by simple enumeration in these intervals (brute force method). When calculating, we exclude those values ​​of the variable x  for which the tangent does not exist.

restart;
Eq1:=tan(3*Pi/x)+4*sin(2*Pi/x)=sqrt(x);
solve(3*Pi/x=Pi/2+Pi*k, x);
seq(%, k=0..3);
for x in {$1..12} minus {2,6} do
if is(Eq1) then print('x'=x) fi;
od:

x:='x':

Eq2:=tan(13*Pi/x)+4*sin(19*Pi/x)=sqrt(x);
solve(13*Pi/x=Pi/2+Pi*k, x);
seq(%, k=0..13);
for x in {$1..36} minus {2,26} do
if is(Eq2) then print('x'=x) fi;
od:

                   

So we get that the first equation has a unique integer root  x=11  and the second equation has a unique integer root  x=7 .

   

You can easily find some solutions in a double loop (brute force method). Of course, finding all solutions remains an open question.

restart;
for x from 1 to 1000 do
for y from 1 to 1000 do
if x!+1=y^2 then print(x,y) fi;
od: od:

                                   4, 5
                                   5, 11
                                   7, 71

With Maple 2018.2 :

restart;
A:=-(sqrt(3)*sqrt(-2*C1 - 2*x) - 3)/(3*sqrt(-2*C1 - 2*x)*x);
expand(A);

                     

 nm 11113  You can simplify your expression  A  by reducing it to a polynomial:

restart;
A:=(-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4;
B:=subs({exp(x/2)=y,exp(x)=y^2}, A);
simplify(B);
subs(y=exp(x/2), %);

                         

Another way is to use double quotes:

restart;
e:=2*``(a + b + c);
expand(e);

                                         

I made 2 corrections: replaced square brackets with round ones and T(x_2)  with T:

restart

T[S] := 290

eta := 17; lambda := 24

h := .2; `&ohm;` := 2*Pi*10; R := 2

T := eta*`&ohm;`^2*R^2*(x[2]/h-(1/2)*(x[2]/h)^2)/lambda+T[S]

(3400/3)*Pi^2*(5.000000000*x[2]-12.50000000*x[2]^2)+290

(1)

plot(T, x[2] = .1 .. .2)

 

Download TSL_bung_9_new.mw

Here an assumption about the signs of the variables is required and the  expand  command:

restart;
simplify(expand(sqrt(cos(a)^(5/3)/sin(2*a)^(5/3)))) assuming sin(a)>0, cos(a)>0;

                                                 


Explanation: The well-known identities for square roots (for example  sqrt(a*b)=sqrt(a)*sqrt(b) )  are true only if the factors are positive.
Example: sqrt((-2)*(-3))=sqrt(6) and
sqrt(-2)*sqrt(-3) = (sqrt(2)*I) * (sqrt(3)*I) = sqrt(6) * I^2 = -sqrt(6)
I is the imaginary unit.

Maybe you want the system itself to be displayed in the traditional form, i.e. with equations one under the other and a curly bracket on the left. The following procedure does this and also gives the solution in the same form.

restart;

SysTrad:=proc(L::{list(equation), set(equation)})
local Sol;
uses InertForm;
print(Display(%piecewise(seq(op([``, L[i]]), i = 1 .. nops(L))), inert = false));
Sol:=solve(L);
Display(%piecewise(seq(op([``, Sol[i]]), i = 1 .. nops(Sol))), inert = false);
end proc: 

Example of use:

SysTrad([x+y-z = 3, x-y-z = 5, -x-y-z = 7]);

                            

The first equation

restart;
pdsolve({diff(u(x,t),t) + 1/2*diff(u(x,t),x)^2 -diff(u(x,t),x,x) =0, u(x,0)=x});

Output               


Maple doesn't know how to solve the second equation (returns NULL)

pdsolve({diff(u(x,t),t,t) -diff(u(x,t),x,x) +2*diff(u(x,t),x,x)^3 -diff(u(x,t),x$4) =0, u(x,0)= 1/x, D[2](u)(x,0)=- 1/x^2});

Here's a workaround that uses symmetry. Example for n=4:

area := 4*int((1-x^4)^(1/4), x=0..1);
convert(area, GAMMA);
evalf(area);

                        


This approach works in the general case  too:

4*int((1-x^n)^(1/n), x=0..1) assuming n>0;
area:=convert(%, GAMMA);
simplify(area-4*GAMMA(1/n+1)^2/GAMMA(1+2/n)) assuming n>0;

                                         

 

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