Kitonum

18619 Reputation

26 Badges

13 years, 312 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Will_iii  I'm wondering why Maple help is missing in Maple Flow, in which Maple syntax is used.

@Lali_miani
 
The first example:

f:=n->2*(n-1)/(2*n-1):
seq(f(n), n=1..10);


and so on.

@Carl Love  Thank you. I fixed the output in my code. When I posted it yesterday, I corrected something but forgot to replace the output. Now it's all right.

@south The  eval  command does roughly the same as the  subs  one. You can replace  eval(f(x), %)  by the subs(%, f(x))  in the code below .   

@etian2  You forgot to call the Physics[Vectors] subpackage:

restart;
with(Physics[Vectors]):
a_-b_;

                                           

 

@jalal  Should be:

A := animate(plot, [[T(a), [[a, f(a)]]], x = -20 .. a, style = [line, point], color = red, thickness = 3, symbolsize = 16], a = -20 .. 20, frames = 90, background = G, view = -20 .. 20):
 
B := animate(plot, [[g(a), [[a, f(a)]]], x = -20 .. a, style = [line, point], color = red, thickness = 3, symbolsize = 16], a = -20 .. 20, frames = 90, background = G, view = -20 .. 20):
 
display(A, B);

 

@acer  1. I did not set a goal to calculate this integral of a complex-valued function over the entire interval,, but simply wanted to explain to OP why Maple does not directly calculate this integral. I also wanted to show that for this calculation it is not necessary to call the VectorCalculus package, but we can simply use the int  command (or evalf(Int) for numerical calculation).

2. As for the integrand, I confused path integral with line integral (omitting the arc differential), as already pointed out by Carl.

@acer Thanks for the helpful critique. Below is the corrected version with your example:

restart:
CartProd:=proc(L)
local n, l, p;
option remember;
n:=nargs;
if n=1 then return args else
if n=2 then return [seq(seq([p,l], l=args[2]), p=args[1])] else
[seq(seq([op(p),l], l=args[n]), p=thisproc(args[1..n-1]))] fi; fi;
end proc:

LL:=seq([seq(x[i,j],j=1..3)],i=1..2):
CartProd(LL);

               

 

@mmcdara  Yes, sure. It's very easy to fix. 

@Angie7

restart;
x:=t->2*a+b*t^3+2*t^2;
solve({x(0)=1, D(x)(1)=1}); 

 

@rquirt  Yes, sure.

@rquirt   Yes, you must do it yourself. Don't expect Maple to always do everything for you.

convert(6*inches, metric)/100;
step:=evalf[4](op(1,%));
seq(f(x)*Unit('m'), x=1.0..10.0, step);

 

@brian bovril  In total there will be 2592 examples under such conditions. Below are some examples of these:

restart:
TA := [A, B, C]:
TB := [X, Y, Z]:
n:=nops(TA):
L:=convert(Matrix(n, (i,j)->[TA[i],TB[j]]), list):
P:=combinat:-permute(L):
k:=0:
for p in P do
if `and`(seq(nops({p[i][],p[i+1][],p[i+2][]})=6, i=1..nops(L)-2, 3)) then k:=k+1; M[k]:=p fi; 
od:
M:=convert(M, list):
k;
for i from 1 to k by 300 do
print(M[i]);
od:  

                  

@brian bovril  But in your example this condition is not met:

                             [[A,X], [B,Y],[C,Z],[B,X], [A,Z], [C,Y],[B,Z],[C,X], [A,Y]]
 

This is basically impossible, as a slight modification of the code from my answer above shows:

restart:
TA := [A, B, C]:
TB := [X, Y, Z]:
n:=nops(TA):
L:=convert(Matrix(n, (i,j)->[TA[i],TB[j]]), list):
P:=combinat:-permute(L):
k:=0:
for p in P do
if `and`(seq(nops({p[i][],p[i+1][],p[i+2][]})=6, i=1..nops(L)-2)) then k:=k+1; 
print(p) fi;
od:
k;  

                                                                     0
                        

@bstuan  Maple is not needed for the solution. We make the change  x=t+3/2  and use the fact that the integral of an odd function over a symmetric (with respect to the origin) interval is equal to 0:

int(x*f(x), x=1..2) = int((t+3/2)*f(t+3/2), t=-1/2..1/2) = int(t*f(t+3/2),  t=-1/2..1/2) + 3/2*int(f(t+3/2), t=-1/2..1/2) = 0 + (3/2)*4 = 6

The function g(t) = t*f(t+3/2)  is odd.

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