Kitonum

21685 Reputation

26 Badges

17 years, 186 days

MaplePrimes Activity


These are replies submitted by Kitonum

@vv  For  x = 0.05 .. 2, y = 0 .. 2  the range of the function is bounded, but rather large. If we increase the lower bound for x-variable, then everything is OK even for the standard grid:

plots:-contourplot(1/(x^2+y^2), x = 0.5 .. 2, y = 0 .. 2, contours = 5, scaling = constrained);

@brian bovril 

seq(max(seq(add(d[s[i]]*x[s[i],s[i+1]], i=1..nops(s)-1) , s=t))<=K, t=Tour2);

d[1]*x[1, 2]+d[2]*x[2, 3]+d[3]*x[3, 4] <= K, max(d[1]*x[1, 2], d[1]*x[1, 3]+d[3]*x[3, 4]) <= K, max(d[1]*x[1, 3], d[1]*x[1, 2]+d[2]*x[2, 4]) <= K, max(d[1]*x[1, 4], d[1]*x[1, 2]+d[2]*x[2, 3]) <= K, max(d[1]*x[1, 2], d[1]*x[1, 3], d[1]*x[1, 4]) <= K

@Earl   Because a straight line intersects a circle at exactly one point if and only if it touches the circle at this point. Of course, for other curves this assertion may be false.

@mattyred99   I have no problems in Maple 2016, Maple 2015, Maple 16 and Maple 12. What version of Maple are you using?  Send a screenshot of your document with this error.

In Maple 2016:


 

restart;
Circle:=x^2+y^2+6*x-8*y+25-1/16:
Eq:=subs(y=m*x, Circle);
discrim(Eq, x);
M:=[solve(%)];
y=M[1]*x;  # The first tangent
y=M[2]*x;   # The second tangent
plots:-implicitplot([Circle,%,%%], x=-4..0,y=0..5, color=[red,blue$2], gridrefine=5, scaling=constrained);

 

x^2+m^2*x^2+6*x-8*m*x+399/16

 

-(143/4)*m^2-96*m-255/4

 

[-192/143-(1/143)*399^(1/2), -192/143+(1/143)*399^(1/2)]

 

y = (-192/143-(1/143)*399^(1/2))*x

 

y = (-192/143+(1/143)*399^(1/2))*x

 

 

 


 

Download Tangents.mw

@Fzen  This is called multiple assignment:

restart;
oldVars:=[a,b,c,d]: newVars:=[1,3,-9,5]:
assign(oldVars=~newVars);

a, b, c, d;
                                          1, 3, -9, 5

 

Addition. The  myfunc  procedure does the same thing:

myfunc:=proc(x)
local i;
for i from 1 to nops(oldVars) do
if x=oldVars[i] then return newVars[i] fi;
od;
undefined;
end proc:

oldVars:=[a,b,c,d]: newVars:=[1,3,-9,5]:
myfunc~(oldVars);  

                                            [1, 3, -9, 5]

@farjad_etg  It's strange. On my computer (Windows 10)  in Maple 2015.2 and 2016.2  everything works correctly 

The use  eval  and  ~  gives the simplest and shortest solution for the original problem:

sol:=solve([sin(t), 0 < t, t < 8*Pi], t, allsolutions, explicit);
eval~(t, [sol]);

 

You must provide the objective function so that everyone can try to work with it. And why  xx=0? Are you looking for a minimum of what function?

@mskalsi  I'm not an expert in pictures formats and therefore I cannot answer your question. For the forum, I always use the PNG format (or GIF for animations).

@Markiyan Hirnyk  I opened your file and saw these pictures:

@idol050279  I opened your file and saw the following picture:

 

For some reason, transparency  option does not work on your computer

@idol050279  I do not understand the reasons for your problems. The codes from your previous message work for me as expected. The code from your last file shows some of the points inside the cylinder, and some of the points  outside of the cylinder. I do not know what do you want. If you increase the diameter of the cylinder, then all the points will be inside it.

@idol050279  Submit your code so that I can see what you see.

@idol050279  I use Maple 2016.2. You probably use an older version of Maple, in which rand command in the specified format does not work. Use the following code instead:

restart;
f:=r->RandomTools:-Generate(float(range=r,method=uniform)):
P1:=[seq([f(0..evalf(2*Pi)),f(0..2),f(0..3)], i=1..20)]:
P2:=map(t->[t[2]*cos(t[1]),t[2]*sin(t[1]),t[3]], P1):
A:=plottools:-cylinder([0,0,0], 2, 3, style=surface, strips=100, transparency=0.7):
B:=plots:-pointplot3d(P2, symbol=solidsphere, color=red, symbolsize=15):
plots:-display(A, B, axes=none);

 

Addition.  Of course, instead of random points, you can take some specific points or points that obey some regularity. For example, in the following example, the points go in a spiral:

restart;
P:=[seq([1.2*cos(t),1.2*sin(t),0.1*t], t=0..30,0.5)]:
A:=plottools:-cylinder([0,0,0], 2, 3, style=surface, strips=100, transparency=0.7):
B:=plots:-pointplot3d(P, symbol=solidsphere, color=red, symbolsize=15):
plots:-display(A, B, axes=none);

 

@AmirHosein Sadeghimanesh   Instead of  x  and  y  should be expressions of these parameters.

Example for 3 parameters:

plot([seq(seq([k[1]-k[2], k[1]+k[3], k[1]=0..1], k[2]=0..1,0.01), k[3]=0..1,0.01)], thickness=4, color=green);

                             

 

 

 

First 65 66 67 68 69 70 71 Last Page 67 of 133