18854 Reputation

26 Badges

13 years, 360 days

MaplePrimes Activity

These are replies submitted by Kitonum

@Carl Love  But by this we have total 3 significant digits, rather than 3 digits after the decimal point:

interface(displayprecision= 3):

@vv  Thanks for this effective way (I did not know about it before). In addition to your answer here is a quote from the Help: "To compute  i^n mod m where  i  is an integer, it is undesirable to use this "obvious" syntax because the powering will be performed first over the integers (possibly resulting in a very large integer) before reduction modulo m. Rather, the inert operator  &^  should be used:  i &^ n mod m .  In the latter form, the powering will be performed intelligently by the mod operation. 

@Joe Riel  It's better. I'm used to using this syntax for lists, but for vectors it also works.

@ahlamsaqer  Write here your specific function.

@Adam Ledger  See an implementation of your formula in the update of my answer above.

@Adam Ledger  Because he has Maple 7 only. Here is the text of this code:

# # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# Differences in the various "functions"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # 

printf("Consider the folowing:\nf:=x^2+5*x:\ng:=x->x^2+5*x:\nh(x):=x^2+5*x:\n\n");
printf("f is of type %a\n",whattype(f));
printf("g is of type %a\n",whattype(g));
printf("h is of type %a\n",whattype(h));
printf("subs(x=2, f) gives %a\n", subs(x=2,f));
printf("f(hello) appends (whatever) to x - %a\n",f(hello));
f(hello);  #appends (whatever) to x;
printf("subs(x=2, f) gives %a\n", subs(x=2,f));
printf("...but f(2) gives %a\n", f(2));
printf("g(2) gives %a\n", g(2));
printf("Both h(2) and eval(h(2)) give %a\n", eval(h(2)));
printf("...but rather subs(x=2,h(x)) gives %a\n", subs(x=2,h(x)));


@brian bovril  My system is Windows 10, Maple 2017.3 32 bit. I have no more comments.

@torabi I do not understand what you mean by "other option".

Maybe you mean a numerical solution? In this case, you also get a zero solution:

sol := dsolve(eval({diff(r*(diff(u(r), r)), r)/r = 0, u(R0) = U2, u(h) = U1}, [h = 1, R0 = 5, U1 = 0, U2 = 0]),  numeric);

plots:-odeplot(sol, [r,u(r)], r = 1 .. 5, color=red, thickness=3);


@brian bovril  It works for me in Maple 2015.2, Maple 2016.2 and Maple 2017.3 properly. Try to do restart and run again.

PS. I uploaded your worksheet. Everything works as well.


[seq(coeff(T,x^p)=coeff(P,x^p), p=1..12), coeff(T,x,0)=coeff(P,x,0)






@asa12  In Maple 12 replace the line  
S:=[seq(subs(var=~p,obj2), p=P)];
by the line
S:=[seq(subs(zip(`=`,var,p),obj2), p=P)];

As for other matrix transformations (in particular those you are writing about), other procedures or an extension of  IsEquivalent  procedure are needed.

@asa12  I did not understand the meaning of your question.

Similar problems arise only in the classic interface. In standard one polygon's filling works correctly for any simply-connected polygons (convex or concave). I added only one line to your code (in Maple 2017.3):

plots[display](<l | lM | H>,scaling=constrained, color=gray);


@das1404  The file is so big because of the animation. Try not to open this file, but just copy the following commands as text and run them in your Maple. I think this should work in Maple 7 (there are no references to the font here). Run not all the commands at once, but one at a time.

Picture := proc (L, C, N::posint := 100, Boundary::list := [linestyle = 1]) 
local i, var, var1, var2, e, e1, e2, P, Q, h; 
global Border; 
for i to nops(L) do 
if type(L[i], listlist(algebraic)) then P[i] := op(L[i]) else 
var := lhs(L[i, 2]); var1 := lhs(rhs(L[i, 2])); var2 := rhs(rhs(L[i, 2])); 
h := (var2-var1)/N; 
if type(L[i, 1], algebraic) then e := L[i, 1]; 
if nops(L[i]) = 3 then P[i] := seq(subs(var = var1+h*i, [e*cos(var), e*sin(var)]), i = 0 .. N) else P[i] := seq([var1+h*i, subs(var = var1+h*i, e)], i = 0 .. N) end if else 
e1 := L[i, 1, 1]; e2 := L[i, 1, 2]; P[i] := seq(subs(var = var1+h*i, [e1, e2]), i = 0 .. N) end if end if end do; 
Q := [seq(P[i], i = 1 .. nops(L))]; 
Border := plottools[curve]([op(Q), Q[1]], op(Boundary)); 
[plottools[polygon](Q, C), Border]; 
end proc:
L1:=[[[0.79*cos(t),-0.13+0.8*sin(t)], t=-Pi/2..Pi/2], [[0,0.67],[-0.83,0.67],[-0.83,0.63],[-0.75,0.63]], [[-0.75+0.14*cos(t),0.49+0.14*sin(t)], t=Pi/2..0], [[-0.61,0.49],[-0.61,-0.76]], [[-0.75+0.14*cos(t),-0.75+0.14*sin(t)], t=0..-Pi/2], [[-0.75,-0.89],[-0.83,-0.89],[-0.83,-0.93],[0,-0.93]]]:
L2:=[[[-0.14+0.66*cos(t),-0.13+0.717*sin(t)], t=-1.94..1.94], [[-0.38,0.54],[-0.38,-0.8]]]:

LetterD:=plots[display](plot([0.62,[-0.75+0.14*cos(t),0.48+0.14*sin(t),t=0..Pi/2]], x=-0.83..-0.75, color=white,filled), Picture(L2, color=white, [color=blue, thickness=5]), Picture(L1, color=yellow, [color=blue, thickness=5]), scaling = constrained):
N:=60: # The number of the frames
R:=seq(plottools[rotate](LetterD, 2*Pi*k/N), k=0..N):
plots[display](R, insequence=true);


@das1404  You can see here an example of creating and rotating in 2D the letter D. It seems you did not see this my answer. I'm wondering whether this file   LetterD1.mws  will work in Maple 7?

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