John2020

220 Reputation

5 Badges

3 years, 174 days

MaplePrimes Activity


These are replies submitted by John2020

@Carl Love 

Dear friend,

Thank you very very much.

@Axel Vogt  

Dear friend,
Thank you very much for your help.
But what I want is another thing which I wrote in reply to @Carl Love .

@Carl Love 

Dear friend,
Thank you very much for your help.
But what I want is for example to write SBesselJ(0,x) instead of sin(x)/x and etc.
Indeed I want to translate sin and cos functions to spherical Bessels.
Like this picture:

 

@acer 

Dear friend,

Yes, Exactly!!

I was looking for such codes.

It works very well.

Thank you very very much.

@acer 

Dear friend,

Thank you very much.

Is there a way to get 2*k ?

@vv 

Dear firend,

Thanks a lot, but it is not correct:

First of all, I want "m" not "p", and as you see the answer must be m=4*cos(varphi(t)).

Your code does not work, see, I replaced p by m and recieved erro:

restart;

with(Physics):

r := x*(diff(theta(t), t))^2+y*(diff(varphi(t), t))^2+z*(diff(theta(t), t$2))+w*diff(varphi(t), t$2)+p*m;
g := (4*(f+T))*(diff(theta(t), t))^2+u*(diff(varphi(t), t))^2+(f+9)*(diff(theta(t), t$2))+4*s*diff(varphi(t), t$2)+p*4*cos(varphi(t));

eval(r-g, [theta=(t->1+t+t^3), varphi=(t->1+t+t^7)]): # or similar
[coeffs(convert(series(%, t), polynom), t)]:
solve(%, [x,y,z,w,m]):
solve(%[1], [x,y,z,w,m]);

 

Error, invalid subscript selector
Error, invalid subscript selector

 

@vv 

Thanks a lot for your reply. It is also very good and applicable, thank you very much, But

It does not work for the following example like other approaches:

restart;

with(Physics):

r := x*(diff(theta(t), t))^2+y*(diff(varphi(t), t))^2+z*(diff(theta(t), t$2))+w*diff(varphi(t), t$2)+p*m;
g := (4*(f+T))*(diff(theta(t), t))^2+u*(diff(varphi(t), t))^2+(f+9)*(diff(theta(t), t$2))+4*s*diff(varphi(t), t$2)+p*4*cos(varphi(t));
eval(r-g, [theta=(t->t^3), varphi=(t->t^7)]): # or similar
solve([coeffs(%, t)], [x,y,z,w,m]);
simplify(eval(r-g, %[1]));   #check

 

Do you have an idea to solve it?

@ecterrab 

Thanks a lot for your reply. It is really simple and short, thank you very much, But

It works only in the cases that all its terms have diff:

For example, in the following case it not works, however, other approaches are like this one, fail:

restart;

with(Physics):

r := x*(diff(theta(t), t))^2+y*(diff(varphi(t), t))^2+z*(diff(theta(t), t$2))+w*diff(varphi(t), t$2)+p*m;
g := (4*(f+T))*(diff(theta(t), t))^2+u*(diff(varphi(t), t))^2+(f+9)*(diff(theta(t), t$2))+4*s*diff(varphi(t), t$2)+p*4*cos(varphi(t));
PDEtools:-Solve(r = g, {w, x, y, z,m}, independentof = t)

 

Do you have an idea to solve it?

@acer 

Hello,

A complicated example that the codes not work for it is as follows:

restart;

with(Physics):

r := x*(diff(theta(t), t))^2+y*(diff(varphi(t), t))^2+z*(diff(theta(t), t$2))+w*diff(varphi(t), t$2);
g := (4*(f+T))*(diff(theta(t), t))^2+u*(diff(varphi(t), t))^2+(f+9)*(diff(theta(t), t$2))+4*s*diff(varphi(t), t$2);

solve(identity(subsindets(r=g,specfunc(:-diff),freeze),
               freeze(:-diff(theta(t),t))),
      [x,y,z,w]);
frontend(solve,[identity(r=g,diff(theta(t),t)),[x,y,z,w]],[{`+`,`*`,`=`,list,specfunc({identity})},{}]);

 

Could you please help me to extend the previous codes for this problem?

@acer 

WoW! Fantastic!

Thanks a lot for your great help.

I really do not how I can appreciate you.

You helped me so much.

Thank you very very very very .... very much.

I wish all the best to you and your family.

Sincerely yours,

J.

@acer 

This new way also works fine!

Thanks a lot.

Thank you very very much, dear friend.

Thanks for spending time. Thank you so much.

@acer 

Dear friend,

Thanks a lot. I really appreciate you. You solved the problem. Many thanks for your response and effort in helping me.

Do you have any idea about Talyor expansion I referred to it as well??

How I can freeze theta(t) in

taylor(cos(theta(t)),theta(t)=0 , 7);

to get the same result with 

taylor(cos(theta),theta=0 , 7)

?? 

The latter one works but the former one gives error.

However, perhaps freezing theta(t) is needless and I must try with other codes. I do not know. 

Sorry for bothering you.

@acer 

Dear friend,

Thanks a lot for your reply.

I did not present further examples because it is needless as the problem occurs in the first simple example as well.

You can see that when we wrote with(Physics) at the top of our codes, the answer changes.

As you stated, It seems that I must change the frozen part, but "Physic:-diff" does not work.

I really wonder about "freeze" in general; I think that freeze is one of the maple's Bugs, I mean that maple should identify these automatically because the issue does not just occur about that; For example, in Taylor's expansion of

taylor(cos(theta(t)),theta(t)=0 , 7);
maple returns error while when I remove the t-dependence as

taylor(cos(theta),theta=0 , 7)
I can get the result. Indeed, maple is incapable of recognizing such things !!

I feel that for this problem, I have to use freeze as well to reach a conclusion. However, I failed for this problem as well.

Anyway, if I find a solution for both, I shall write here.

Thanks a lot for your evergreen helps. 

@acer 

Dear friend, as I promised, I tried complicated cases and for one of them still, it works fine.

But there is an important point about using this way:

We have to not use the "physics package".

I am using two packages: with(LinearAlgebra): and with(Physics)

when I disabled the physics package this approach works, otherwise it returns the problem that I had with other approaches.

@acer 

Dear friend,

Thank you very much. 

You made me happy.

Thanks a lot.

For the complicated examples, I will try using your proposed approach. If there is a problem, I will write here.

Thank you so much.

Best Wishes.

1 2 3 4 Page 2 of 4