Kitonum

21840 Reputation

26 Badges

17 years, 227 days

MaplePrimes Activity


These are replies submitted by Kitonum

@vanzzy 
Example for the first root:
restart;
gm:=V->1/sqrt(1-V^2): T:=w-k*V: S:=w*V-k:
f:=unapply(I*B*gm(V)^3*T^3+gm(V)^2*T^2-I*gm(V)^3*T*S^2-1/3*I*B*gm(V)^3*S^3*T-1/3*gm(V)^2*S^2, w,B,V,k);
F:=(B,V,k)->fsolve(f(w,B,V,k), w, complex);
plot(Im('F'(B,0.5,2)[1]), B=0..1);


Addition. Your equation has 4 degree for w. Here is the plots of all the roots:

restart;
gm:=V->1/sqrt(1-V^2): T:=w-k*V: S:=w*V-k:
f:=unapply(I*B*gm(V)^3*T^3+gm(V)^2*T^2-I*gm(V)^3*T*S^2-1/3*I*B*gm(V)^3*S^3*T-1/3*gm(V)^2*S^2, w,B,V,k);
F:=(B,V,k)->fsolve(f(w,B,V,k),w, complex);
plot([seq(Im('F'(B,0.5,2)[i]), i=1..4)], B=0..1);

 

@brian bovril  Hi Brian! My procedure easily solves this problem. Replace the fountain with a large enough bucket (I took 40 gallons), half full (so that was where to pour the water if required). The middle branch of all the solutions tree gives the desired solution. We see what is required at least 6 steps:

Pouring([40,5,3], [20,0,0]);
Pouring([40,5,3], [20,0,0], trails)[2][1..7];


                                       

At the same time, we get all possible cases of filling these vessels with a capacity of 5 and 3 gallons.

 

Happy Xmas to you and all Maple fans!


Edit.

@asa12  You have long been on this forum and do not understand the obvious things. You must copy your code here in text form (and not as a picture) or upload your worksheet.

@waseem  Use  style=pointline  option.

Example (in Maple 2018.2):

plot(sin(x), x=0..2*Pi, style=pointline, color=red, symbolsize=12, symbol=asterisk, numpoints=40, adaptive=false); 

@waseem 

restart;
 h:=z->1-(beta*delta2/2)*(1 + cos(2*(Pi/L1)*(z - L1))):
 K1:=((4/h(z)^4)-(sin(alpha)/Gamma2)-h(z)^2+Nb*h(z)^4):
 lambda:=Int(K1,z=0..1):
 L1:=0.2:
 alpha:=Pi/6:
plots:-display(Matrix(2,2, [seq(plot([seq(seq(evalf(eval(lambda,[Nb=j,beta=m1])),j=[0.1,0.2,0.3]),m1=[0.1,0.2,0.3])],delta2=0.02..0.1, style=[line$3,point$6], linestyle=[solid,dash,longdash], numpoints=50, symbolsize=8,  symbol=[asterisk,circle,cross,diamond,point,box], legend=[seq(seq(['Nb'=Nb,'beta'=beta],Nb=[0.1,0.2,0.3]),beta=[0.1,0.2,0.3])], labels=[typeset(`δ1`), typeset(conjugate(`Δp`))], title=typeset("Effect of ", 'alpha', " when ", Gamma,"2=",Gamma2)), Gamma2=[10,20,30,40])]));

 

@waseem

 

restart;
 h:=z->1-(beta*delta2/2)*(1 + cos(2*(Pi/L1)*(z - L1))):
 K1:=((4/h(z)^4)-(sin(alpha)/Gamma2)-h(z)^2+Nb*h(z)^4):
 lambda:=Int(K1,z=0..1):
 L1:=0.2:
 alpha:=Pi/6:
plots:-display(Matrix(2,2, [seq(plot([seq(seq(evalf(eval(lambda,[Nb=j,beta=m1])),j=[0.1,0.2,0.3]),m1=[0.1,0.2,0.3])],delta2=0.02..0.1,   legend=[seq(seq(['Nb'=Nb,'beta'=beta],Nb=[0.1,0.2,0.3]),beta=[0.1,0.2,0.3])], labels=[typeset(`δ1`), typeset(conjugate(`Δp`))], title=typeset("Effect of ", 'alpha', " when ", Gamma,"2=",Gamma2)), Gamma2=[10,20,30,40])]));

 

@mehdibaghaee  Use  axesfont  option:

restart;
plot([x^(1/2), x, x^2], x=0..2, 0..2, linestyle=[dot, dash, dashdot], color=red, thickness=2, scaling=constrained, legend=["1st mode","2nd mode","3nd mode"], legendstyle=[location=right], axesfont=[times,10], size=[500,400], gridlines);
                    

 

@Subhan331  As soon as the condition  abs(x[k]-x[k-1]) < tol  was fulfilled (for  k=6), the loop was interrupted due to the keyword  break .

Changing the width of the airfoil is controlled by r0- parameter:

restart;
r0:=1.124: x0:=1-r0: y0:=0.1:
z:=x+I*y:
f:=unapply(evalc~([(Re,Im)(z+1/z)]), x,y);
F:=plottools:-transform(f):
C:=r0->plots:-implicitplot((x-x0)^2+(y-y0)^2=r0^2, x=-2..2, y=-2..2, color=red, thickness=2) :
plots:-animate(plots:-display,[ 'F(C(r0))', scaling=constrained], 'r0'=1.124..1.224, frames=101, size=[800,350]);
                       

@acer 

restart;
A := <b,1,3 | 4,b,6>:
B := <b,1,3 | 4,b+1,6>:
GE1 := LinearAlgebra:-GaussianElimination(A);
GE2 := LinearAlgebra:-GaussianElimination(B);
solve({`*`(seq(GE1[i,i], i=1..2))<>0}, b);
solve({`*`(seq(GE2[i,i], i=1..2))<>0}, b);


In the first example, one answer, and in the second example both answers are incorrect.

Probably in the examples with parameters, in general, a full search of all square submatrices of maximum rank is required.

@acer This method can lead to erroneous results. Here is a simple example with 2 vectors:

restart;
A := <b,1,3 | 4,2,6>;
GE := LinearAlgebra:-GaussianElimination(A);
solve({seq(GE[i,i]<>0, i=1..2)}, b);

Output is  {b <> 0, b <> 2} . But if  b=0 , then both vectors are also linearly independent. 

 

@Joe Riel  The useful comment. I'm sure for a smaller number of vectors, the corresponding condition should be imposed on the rank. 

Now I don’t have time to understand your code in detail (maybe this evening), but two errors immediately catch my eye:

1. Vertices must be specified in a single list (not a sequence), that is should be  [[2.5, 21], [6, 13.5], [8, 10], [11, 24.5], [14.3, 19.4], [16.8, 26], [22, 21.5], [22, 17], [22.2, 12.5], [26.8, 23], [28, 20.5], [30, 25.5], [32, 21], [29.5, 16]].

2. Distance  command does not do what you want.

3. I do not see where  GraphTheory package is called. This is usually done using  uses  option in the procedure body.


Earlier, I solved your problem. See this thread

 

@bliengme After your response, I, like Joe, also stopped understanding what you want.

I saw acer's answer already after I sent my own. For positive numbers, our answers are the same, but for negative non-integer numbers, the answers are different, as  trunc  command rounds in the direction to  0 . But OP wrote "How to find the integer that is less than and closest to a real number" .

First 39 40 41 42 43 44 45 Last Page 41 of 134