primogen

20 Reputation

One Badge

6 years, 257 days

MaplePrimes Activity


These are replies submitted by primogen

@Carl Love 

It's okay. I've got a question about subsindex and specindex from the other thread. I used this on another matrix but this time the matrix actually has two different variables. 5 thetas and a d. The code I used for it is below

qdot:= diff~(subsindets(MassMatrix, specindex(theta), T-> T(t)),t)
I want to express d as d(t) in addition to thetas and there is only one d. I tried:

qdot(5,1):= diff(d(t),t)

Initially I thought it worked but when I tried to differentiate a matrix with respect to d, I got a zero matrix. Do you know how I can fix this?

 

@acer 

Using diff with Physics never occured to me but it works too. Thanks very much!

@Carl Love 

I believe that did the trick! There is no way to express how relieved I am! Thank you!!!

Are there any books where I can learn these commands?

@acer 

Please check the worksheet below (it's short-2 lines only). In the first line I used fundiff with respect to theta 2 and got the results shown but they have terms like Dirac(0) and Dirac(1,0). The second line shows the undifferentiated version. What I want is a result without Diracs. Is there a command that does it?

So, my goal is to differentiate SimplifiedMassMatrixDot with respect to several thetas. Could you also check the validity of the command, please?

a.mw

@Carl Love 

step1calshelper.mw

Hello, again. The worksheet above has the error that comes up when I run that code. I tried Parameter command but it didn;t work. Can we please find a solution to this?

@Carl Love 

I thought the code worked but after comparing the output of the code and SimplifiedMassMatrixDot, they seem to be the same oddly.

@Carl Love 

I didn't notice them. They must have appeared when I copied over the code here. The code you gave results in a zero matrix. Did you get something else? 

Edit: I typed the code without "Physics:-" and it worked ://. But the output has Physics-:Fundiff text everywhere. Please see the end of the worksheet.

step1calshelper.mw

I'm grateful for the help by the way. Thanks very much!!!

@Carl Love 

There was a misunderstanding. I thought you wanted to see the output of the MassMatrix, not the error. That's why I didn't suppress MassMatrix's output. Anyways, after taking the derivative, if I want to find the derivative with respect to theta1, do I have to revert to theta(t)'s to thetas? I'm trying to do this operation on the time-differentiated matrix by the way. I tried the code  below but it doesn't work.

[diff]~(SimplifiedMassMatrixDot, theta[1](t))

Here is the worksheet step1calshelper.mw

Thanks in advance.

@Carl Love 

I did look at it. I put a : to make it neater. Oddly enough, I just ran that command and it worked.

@Carl Love 

step1calshelper.mw

~ didn't fix it by the way.

@Carl Love 

Thanks very much. You saved me lots of time! I appreciate it! I'll look at the commands in more detail later today. I've got a question about 

dMM_t := diff(MM_t, t);

When I run it it gives me the error below.
Error, non-algebraic expressions cannot be differentiated

Finally, do you think the assignments below correct?

cos(theta[1])^2+sin(theta[1])^2 = 1;
c[2]^2+s[2]^2 = 1;
c[3]^2+s[3]^2 = 1;
c[4]^2+s[4]^2 = 1;
I want to make sure that during the differentiation maple also simplifies the final expression. Would maple do this automatically because of the 4 equations above?

Thanks!

step1calshelper.mw@Carl Love 

MassMatrix is the one I'd like to differentiate. Also, is it possible to differentiate a matrix? I was going to complete the differentiation by differentiating each each cell one by one. Thanks in advance.

I'm not sure what expr is. I tried theta=theta(t) but it didn't help. Do you have any idea why this didn't work?

Edit:I used subs command to substitute theta(t) to theta in a simple equation but when I differentiate it with respect to t, I'm still getting zero.

Page 1 of 1