Kitonum

21560 Reputation

26 Badges

17 years, 136 days

MaplePrimes Activity


These are replies submitted by Kitonum

@nm  Sorry, I am wrong. I had in mind a syntax error for the numerical solution. I corrected the title.

@ahmeng  See help on  value(%)  and  emptysymbol(``)

@Lali_miani  In Maple, there is a rule: if at least one number is represented as a decimal fraction, for example  0.2  in your example, then Maple calculates the entire expression approximately (by default with 10 significant digits). If you want to have a symbolic representation, then instead of 0.2 you should write 1/5, that is  sin(1/5) . But then in the output Maple just writes the same thing, since sin(1/5)  can not be exactly written in a simpler form, for example, in radicals. But with this expression it is possible to work further, for example to calculate it approximately with some accuracy or to expand in a series, etc.

 

 

@Lali_miani  Unfortunately I'm not familiar with English-language books on Maple (English is not my native language). Maybe someone else will advise you a good book on Maple.

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

interface(displayprecision= 3):
evalf(Pi);
                                                   
3.14
 

@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:

restart:
# # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# 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");
f:=x^2+5*x:
printf("f is of type %a\n",whattype(f));
g:=x->x^2+5*x:
printf("g is of type %a\n",whattype(g));
h(x):=x^2+5*x:
printf("h is of type %a\n",whattype(h));
printf("subs(x=2, f) gives %a\n", subs(x=2,f));
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));
f(2);
printf("g(2) gives %a\n", g(2));
g(2);
printf("Both h(2) and eval(h(2)) give %a\n", eval(h(2)));
eval(h(2));
printf("...but rather subs(x=2,h(x)) gives %a\n", subs(x=2,h(x)));
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:

restart;
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.

@gmzsvsclk 

restart:
P:=product((x-j),j=0..11);
Q:=a*x^6+b*x^5+c*x^4+d*x^3+e*x^2+f*x+g:
R:=j*x^4+k*x^3+l*x^2+m*x+n:
T:=Q^2-R:
[seq(coeff(T,x^p)=coeff(P,x^p), p=1..12), coeff(T,x,0)=coeff(P,x,0)
];
solve(%);

            

Verification:

assign(%[1]):
'Q'=Q;
'R'=R;
solve(Q^2-R);

             


Edit.

@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.

First 48 49 50 51 52 53 54 Last Page 50 of 133