<

Ali Hassani

40 Reputation

4 Badges

7 years, 189 days

MaplePrimes Activity


These are questions asked by Ali Hassani

 

Dear All,

I have a question about "fraddiff" command to compute the fractional derivative of a function.
I need to produce  a procedure to manually compute Caputo fractional derivative of a function, instead of using "fracdiff", as the following:

Frac_C:=proc()
description "Frac_C(function,lower bound, variable (upper bound), order of differentiation)";
a:=args[2];
x:=args[3];
alpha:=args[4];
f:=unapply(args[1],args[3]);
m:=ceil(alpha);
return 1/GAMMA(m-alpha)*int((x-tau)^(m-alpha-1)*diff(f(tau),tau$m),tau=a..x);
end proc;

when I call the above procedure, as Frac_C(x^(3.4),0,x,3/4), Maple is not able to calculate the integral defined in the Caputo fractional derivative. However, I saw the pre-defined Maple command, namely fracdiff, is able to do.
Where is the trouble?
can anyone help me?

It is worth mentioning that I can calculate the fractional derivative of a functional by procedure "Frac_C()" when I try to use it at the given x as the following which is not desirable for me.
evalf(subs(x=2,Frac_C(x^(3.4),0,x,3/4)));
evalf(subs(x=2,fracdiff(x^(3.4),x,3/4)));

Best wishes

Dear All,
I want to extract the coefficients of Chebyshev of an arbitrary function, for example, exp(x). I know that we can use the following command to make a Chebyshev series expansion of exp(x):
chebyshev(exp(x),x);
the above returns the sum of nth Chebyshev polynomials multiplied by Chebyshev coefficients as the following:
1.26606587775201*T(0, x) + 1.13031820798497*T(1, x) + 0.271495339534077*T(2, x) + 0.0443368498486638*T(3, x) + 0.00547424044209371*T(4, x) + 0.000542926311913993*T(5, x) + 0.0000449773229542760*T(6, x) + 3.19843646244580*10^(-6)*T(7, x) + 1.99212480641582*10^(-7)*T(8, x) + 1.10367717095000*10^(-8)*T(9, x) + 5.50589697979079*10^(-10)*T(10, x)

I like to take the coefficients 1.266,1.1303, 0.2714, 0.04433, and so on. How can I do it?
Thanks


Dear all,
I want to create a superscripted and subscripted variable in 1-D math. I know that I can establish a subscripted variable by using double “_”, for example, the execution of the following command causes assignment 2 to u__b, in which b is the subscript of u.
u__b:=2;
However, I don’t know any way to create either a superscripted variable or a variable having both the subscript and superscript in 1-D math.
Can anyone help me?
 Best wishes

Dear All,
I want to solve a highly nonlinear equation in one variable. The equation includes some undetermined parameters. The running time is long in serial programming. Can I help me to execute the following command in parallel? I know that the ‘solve’ command is not thread-safe.

solve(Eq1, beta);
 
 Let me know solve the problem, if the number of equations is larger than one, as below:
solve({eq1,eq2,eq3},{beta1,beta2,beta3});
Best wishes

 

Dear All,

I want to apply the ‘simplify’ command, in parallel, for the simplification of some parameters. Both Grid:-Map and Grid:-Run commands are tested. There is no error in both, whereas no simplification is implemented. It seems that the ‘simplify’ command correctly works on only ‘Master’ node, namely anywhere we are typing.

Can anyone help me to simplify in parallel. I examined two following codes.

1)

with (Grid);

for i from 1 to nops(dummy_UU1) do

freenode:=WaitForFirst():

Run(freenode,simplify,[dummy_UU1[i]],assignto='dummy_UU2'[i]):

end do:

Wait();

2)

dummy_UU2:=Map[tasksize=1](simplify,[seq(dummy_UU1[i],i=1..nops(dummy_UU1))]):

 

 

The following code is correctly executed and resulted in the simplification of dummy_UU1 components in serial.

for i from 1 to nops(dummy_UU1) do

dummy_UU2[i]:=simplify(dummy_UU1[i]):

end do:

 

1 2 Page 1 of 2