Nadeem_Malik

15 Reputation

One Badge

0 years, 45 days

MaplePrimes Activity


These are replies submitted by Nadeem_Malik

@Carl Love

Thanks.

(1) I actually want the spectrum, that is S(w)=|F(w)|^2 -- I tried doing this on the answer but it left it in too general a form  -- have a look at the last example on my attached sheet. I am sure that this could be simplified further, using trig and CylinderD identities ? 

(2) In Maple, when a write or obtain get a function of a parameter such as in the last example g(w;a)=|A|^2 (w;a), where a is a parameter, how can I put in specific choice of a; e.g. g(a=0.3)? (Sorry, but I am comletely new to Maple!) 

(3) How can I plot the fuction g(w;a=0.3) in the above example ?

 

Thanks

Nadeem

 


 

with(inttrans)

fourier(exp(-t^2), t, w)

exp(-(1/4)*w^2)*Pi^(1/2)

(1)

fourier(t*exp(-t^2), t, w)

-((1/2)*I)*w*exp(-(1/4)*w^2)*Pi^(1/2)

(2)

fourier(exp(-t^2)/t, t, w)

-I*Pi*erf((1/2)*w)

(3)

fourier(t^.3*exp(-t^2), t, w)

fourier(t^(3/10)*exp(-t^2), t, w)

(4)

fourier(exp(-t^2)/t^.3, t, w)

fourier(exp(-t^2)/t^(3/10), t, w)

(5)

simplify(int(t^a*exp(-t^2-I*w*t), t = -infinity .. infinity))

-(1/4)*Pi^(1/2)*exp(-(1/8)*w^2)*(((I*(-1)^a-I)*cos((1/2)*a*Pi)-sin((1/2)*a*Pi)*((-1)^a+1))*CylinderD(a, -(1/2)*2^(1/2)*w)-CylinderD(a, (1/2)*2^(1/2)*w)*((I*(-1)^a-I)*cos((1/2)*a*Pi)+sin((1/2)*a*Pi)*((-1)^a+1)))*2^(-(1/2)*a)/(sin((1/2)*a*Pi)*cos((1/2)*a*Pi))

(6)

simplify(int(exp(-t^2-I*w*t)/t^.3, t = -infinity .. infinity))

(-.5301293489+.7296604513*I)*exp(-.125*w^2)*((1.962610505+1.000000000*I)*w*CylinderD(.7000000000, -.7071067812*w)+(2.775550393+1.414213561*I)*CylinderD(1.700000000, -.7071067812*w)+(-0.9626105051e-10+0.1925221010e-10*I)*CylinderD(1.700000000, .7071067812*w))

(7)

simplify(int(exp(-t^2-I*w*t)/t^.3, t = 0 .. infinity))

1.093980653*exp(-.125*w^2)*((-.5095254496+1.000000000*I)*w*CylinderD(.7000000000, -.7071067812*w)+(.5095254496+1.000000000*I)*w*CylinderD(.7000000000, .7071067812*w)+(-.7205778012+1.414213563*I)*CylinderD(1.700000000, -.7071067812*w)+(-.7205778012-1.414213563*I)*CylinderD(1.700000000, .7071067812*w))

(8)

simplify(int(t^a*exp(-t^2-I*w*t), t = 0 .. infinity))

(1/4)*2^(-(1/2)*a)*((I*cos((1/2)*a*Pi)+sin((1/2)*a*Pi))*CylinderD(a, -(1/2)*2^(1/2)*w)-(I*cos((1/2)*a*Pi)-sin((1/2)*a*Pi))*CylinderD(a, (1/2)*2^(1/2)*w))*Pi^(1/2)*exp(-(1/8)*w^2)/(sin((1/2)*a*Pi)*cos((1/2)*a*Pi))

(9)

``

``

A := simplify(int(t^a*exp(-t^2-I*w*t), t = 0 .. infinity))

(1/4)*2^(-(1/2)*a)*((I*cos((1/2)*a*Pi)+sin((1/2)*a*Pi))*CylinderD(a, -(1/2)*2^(1/2)*w)-(I*cos((1/2)*a*Pi)-sin((1/2)*a*Pi))*CylinderD(a, (1/2)*2^(1/2)*w))*Pi^(1/2)*exp(-(1/8)*w^2)/(sin((1/2)*a*Pi)*cos((1/2)*a*Pi))
``

(10)

``

abs(A)^2

(1/16)*Pi*(exp(-(1/8)*Re(w^2)))^2*abs(2^(-(1/2)*a)*((I*cos((1/2)*a*Pi)+sin((1/2)*a*Pi))*CylinderD(a, -(1/2)*2^(1/2)*w)-(I*cos((1/2)*a*Pi)-sin((1/2)*a*Pi))*CylinderD(a, (1/2)*2^(1/2)*w))/(sin((1/2)*a*Pi)*cos((1/2)*a*Pi)))^2

(11)

``

``


 

Download Sheet_fourier_1.mw

@Carl Love 

Thanks.

What does CylinderD stand for?

Is there a reason why the "fourier" function does not do thi?

Strictly speaking, the function itself is singular at t=0, so really should be taking the FT of f(t)*Heavside(t). How would you evaluate the FT/integrals of the following functions using Maple:

(1) f(t)=(1/t^a)*Heavside(t)

(2) f(t)=(1/t^a)*exp(-t^2)*Heavside(t)

 

Thanks

Nadeem


Hi, the worksheet is aded.

- Nadeem

 

with(PDEtools)

declare(u(y, R))

` u`(y, R)*`will now be displayed as`*u

(1)

declare(l(y, R))

` l`(y, R)*`will now be displayed as`*l

(2)

L := diff_table(l(y, R))

table( [(  ) = l(y, R) ] )

(3)

NULL``

U := diff_table(u(y, R))

table( [(  ) = u(y, R) ] )

(4)

DepVars := ([l, u])(y, R)

[l(y, R), u(y, R)]

(5)

PDE := U[y, y]+2*l(y, R)^2*U[y]*U[y, y]+2*l(y, R)*L[y]*U[y]^2+1/R = 0

diff(diff(u(y, R), y), y)+2*l(y, R)^2*(diff(u(y, R), y))*(diff(diff(u(y, R), y), y))+2*l(y, R)*(diff(l(y, R), y))*(diff(u(y, R), y))^2+1/R = 0

(6)

infinies := Infinitesimals(PDE)

[_xi[y](y, R, l, u) = _F2(R)*y+_F3(R), _xi[R](y, R, l, u) = _F1(R), _eta[l](y, R, l, u) = (1/2)*l*(-R*_F2(R)+_F1(R))/R, _eta[u](y, R, l, u) = (2*R*_F2(R)-_F1(R))*u/R+_F4(R)]

(7)

InfinitesimalGenerator(infinies, DepVars, prolongation = 1)

proc (f) options operator, arrow; add(xi[x[j]]*(diff(f, x[j])), j = 1 .. 2)+add(eta[u[m]]*(diff(f, u[m]))+eta[u[m], [y]]*(diff(f, u[m][y]))+eta[u[m], [R]]*(diff(f, u[m][R])), m = 1 .. 2) end proc

(8)

Phi := Invariants(infinies, DepVars)

l*exp(-(1/2)*(Int((-R*_F2(R)+_F1(R))/(R*_F1(R)), R))), -(Int(_F3(R)*exp(-(Int(_F2(R)/_F1(R), R)))/_F1(R), R))+y*exp(-(Int(_F2(R)/_F1(R), R))), u*exp(Int((-2*R*_F2(R)+_F1(R))/(R*_F1(R)), R))-(Int(_F4(R)*exp(Int((-2*R*_F2(R)+_F1(R))/(R*_F1(R)), R))/_F1(R), R)), u[y]*exp(Int((-R*_F2(R)+_F1(R))/(R*_F1(R)), R)), l[y]*exp(-(1/2)*(Int((-3*R*_F2(R)+_F1(R))/(R*_F1(R)), R))), (1/2)*Intat(-exp((1/2)*(Int((2*(diff(_F1(_j), _j))*_j+_j*_F2(_j)-_F1(_j))/(_j*_F1(_j)), _j)))*(-2*(diff(_F2(_j), _j))*_j^2*l[y]*(y*exp(-(Int(_F2(R)/_F1(R), R)))-(Int(_F3(R)*exp(-(Int(_F2(R)/_F1(R), R)))/_F1(R), R))+Int(_F3(_j)*exp(-(Int(_F2(_j)/_F1(_j), _j)))/_F1(_j), _j))*exp(Int(_F2(_j)/_F1(_j), _j)+(1/2)*(Int((-3*_j*_F2(_j)+_F1(_j))/(_j*_F1(_j)), _j))-(1/2)*(Int((-3*R*_F2(R)+_F1(R))/(R*_F1(R)), R)))+l*(-(diff(_F2(_j), _j))*_j^2+(diff(_F1(_j), _j))*_j-_F1(_j))*exp((1/2)*(Int((-_j*_F2(_j)+_F1(_j))/(_j*_F1(_j)), _j))-(1/2)*(Int((-R*_F2(R)+_F1(R))/(R*_F1(R)), R)))-2*(diff(_F3(_j), _j))*l[y]*_j^2*exp((1/2)*(Int((-3*_j*_F2(_j)+_F1(_j))/(_j*_F1(_j)), _j))-(1/2)*(Int((-3*R*_F2(R)+_F1(R))/(R*_F1(R)), R))))/(_j^2*_F1(_j)), _j = R)+l[R]*exp((1/2)*(Int((2*(diff(_F1(R), R))*R+R*_F2(R)-_F1(R))/(R*_F1(R)), R))), u[R]*exp(Int(((diff(_F1(R), R))*R-2*R*_F2(R)+_F1(R))/(R*_F1(R)), R))+Intat(-exp(Int(((diff(_F1(_k), _k))*_k-2*_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k)-(Int((-_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k))-(Int((-2*_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k)))*(-(diff(_F2(_k), _k))*_k^2*u[y]*(y*exp(-(Int(_F2(R)/_F1(R), R)))-(Int(_F3(R)*exp(-(Int(_F2(R)/_F1(R), R)))/_F1(R), R))+Int(_F3(_k)*exp(-(Int(_F2(_k)/_F1(_k), _k)))/_F1(_k), _k))*exp(Int(_F2(_k)/_F1(_k), _k)+Int((-2*_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k)+Int((-R*_F2(R)+_F1(R))/(R*_F1(R)), R))+(diff(_F4(_k), _k))*exp(Int((-_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k)+Int((-2*_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k))*_k^2-_k^2*u[y]*(diff(_F3(_k), _k))*exp(Int((-2*_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k)+Int((-R*_F2(R)+_F1(R))/(R*_F1(R)), R))+exp(Int((-_k*_F2(_k)+_F1(_k))/(_k*_F1(_k)), _k))*(u*exp(Int((-2*R*_F2(R)+_F1(R))/(R*_F1(R)), R))-(Int(_F4(R)*exp(Int((-2*R*_F2(R)+_F1(R))/(R*_F1(R)), R))/_F1(R), R))+Int(_F4(_k)*exp(-(Int((2*_k*_F2(_k)-_F1(_k))/(_k*_F1(_k)), _k)))/_F1(_k), _k))*(2*(diff(_F2(_k), _k))*_k^2-(diff(_F1(_k), _k))*_k+_F1(_k)))/(_k^2*_F1(_k)), _k = R)

(9)

``


 

Download Sheet8.mw

@dharr 

Thanks. When I do "InfinitesimalGenerator(u(y, R))", I get the same error message.

A follow up question is, ifI want to impose the conditions on F1, F2, F3, F4 in She et al, how do I do that? Maybe that is what is required? In other words, explictly state the infinitesimals, like _zeta_y =y,  etc. Can that be done -- can you give me an example please.

 

Thanks

Nadeem 

 

restart

with(PDEtools)

U := diff_table(u(y, R))

declare(U[])

` u`(y, R)*`will now be displayed as`*u

(1)

L := diff_table(l(y, R))

declare(L[])

` l`(y, R)*`will now be displayed as`*l

(2)

PDE := U[y, y]+2*l^2*U[y]*U[y, y]+2*l*L[y]*U[y]^2+1/R = 0

diff(diff(u(y, R), y), y)+2*l^2*(diff(u(y, R), y))*(diff(diff(u(y, R), y), y))+2*l*(diff(l(y, R), y))*(diff(u(y, R), y))^2+1/R = 0

(3)

Infinitesimals(PDE)

[_xi[y](y, R, l, u) = _F2(R)*y+_F3(R), _xi[R](y, R, l, u) = _F1(R), _eta[l](y, R, l, u) = (1/2)*l*(-R*_F2(R)+_F1(R))/R, _eta[u](y, R, l, u) = (2*R*_F2(R)-_F1(R))*u/R+_F4(R)]

(4)

 

{InfinitesimalGenerator(u(y, R))}

 

Error, invalid input: PDEtools:-InfinitesimalGenerator expects its 1st argument, S0, to be of type {procedure, list(`=`), list(algebraic)}, but received u(y, R)``

 

``


 

Download Wsheet2.mw

@dharr 

Dear Dharr,

I have followed this for a real problem in Z.-S. She et al, J. Fluid Mech. (2017),vol. 827, p.322. I get an error message below. (There is actually a line missing when I save, which I have put in by hand in curly brackets { - }.)

I note that when I do, infinies[-1], I do not get it printed out properly? Then InfinitesimalGenerator fails, which is what the error message refers to.

In She et al, they have F3-F4=0, and F2=1, F3=aR (a is a constant) -- but this is not eadily apparent from the output below? They then obtain the invariants, which is what I want to do using Phi=Invariants(infinies[-1],l,u)  - or equivalent - but I have not got there yet.

Can you advise please.

Thanks

Nadeem

 

restart

with(PDEtools)

U := diff_table(u(y, R))

declare(U[])

` u`(y, R)*`will now be displayed as`*u

(1)

L := diff_table(l(y, R))

declare(L[])

` l`(y, R)*`will now be displayed as`*l

(2)

PDE := U[y, y]+2*l^2*U[y]*U[y, y]+2*l*L[y]*U[y]^2+1/R = 0

diff(diff(u(y, R), y), y)+2*l^2*(diff(u(y, R), y))*(diff(diff(u(y, R), y), y))+2*l*(diff(l(y, R), y))*(diff(u(y, R), y))^2+1/R = 0

(3)

Infinitesimals(PDE)

[_xi[y](y, R, l, u) = _F2(R)*y+_F3(R), _xi[R](y, R, l, u) = _F1(R), _eta[l](y, R, l, u) = (1/2)*l*(-R*_F2(R)+_F1(R))/R, _eta[u](y, R, l, u) = (2*R*_F2(R)-_F1(R))*u/R+_F4(R)]

(4)

infies[-1]

infies[-1]

(5)

 

{InfinitesimalGenerator(infies[-1], u(y, R))}InfinitesimalGenerator(infies[-1], u(y, R))

Error, invalid input: PDEtools:-InfinitesimalGenerator expects its 1st argument, S0, to be of type {procedure, list(`=`), list(algebraic)}, but received infies[-1]

 

``


 

Download Wsheet2.mw

@Carl Love 

Thanks Carl. Things are getting better -- slowly.

-nadeem

 

@Nadeem_Malik 

Actually, second thoughts, I will continue with the questions here - save me time having to repeat.

(Incidently, how do I attach a worksheet to this post? In fact how do I save a worksheet in Maple?)

 

After generating the infinitesimals as noted, I want to generate the group invariants. In the examples they refer to the last part of equation (??) -- which here in my worksheet is equation (3). I have tried, but I cannot get (3)_-1 (this is meant to be a subscript of -1 to (3). I tried this and got the error messaage:


InfinitesimalGenerator((3), u(x, t))
Error, invalid input: PDEtools:-InfinitesimalGenerator expects its 1st argument, S0, to be of type {procedure, list(`=`), list(algebraic)}, but received 3
 

The only way I can get the invariants is to explicitly put in the infinitesimals by hand first in to 

InfinitesimalGenerator([...],u(x,t)) 

and then in to

Phi := Invariants([...],u(x,t))

where [...] is the explicit list of infinitesimals.

 

What am I doing wrong?

Thanks

Nadeem

 

 

 

 

Thanks guys,

restart:
with(PDETools):
U:= diff_table(u(x,t)):
declare(U[]);
PDE:= U[x,x] - U[t] = 0;  #Note the square brackets!
Infinitesimals(PDE);

This works now, but it confuses me more because why didn't the standard example work?

What I gather from this is that declare is best done through declare(U[]) -- it's the only difference that I can see.

(Note: when a copy and paste on to this forum, some things are not correct, thus U_x,x actualy does appear correctly as Ux,x and U_t as Ut on my maple. There are other minor things like '" : " sometimes appears " ; " after copy.)

OK, that is dortec out, but other problems appear, but I'll raise them in another post.

Cheers

-nadeem

 

 

 

Page 1 of 1