Reputation: 69
I want to evaluate a matrix that has a function named alpha. When I take the derivative of alpha, I would like the result to give me an alpha'
Example: if I have sin(alpha)
I want to get cos(alpha)alpha'
but throughout the matrix.
Upvotes: 0
Views: 454
Reputation: 69
Thank you for answering. I found the solution after a lot of guess and checking and reading. Here is my code with my solution.
with(Typesetting) :
Settings(typesetdot = true);
a:= alpha(t)
Rna:= [ cos(alpha), -sin(alpha), 0; sin(alpha), cos(alpha), 0; 0, 0, 1 ]
b := beta(t)
Rab:= [ cos(beta), -sin(beta), 0; sin(beta), cos(beta), 0; 0, 0, 1 ]
Rnab:= Rna . Rab
Rnab:= map(diff, Rnab, t)
Sorry for the multiple answers, I am getting use to the website.
Upvotes: 1
Reputation: 7271
It is quite unclear what you mean by stating that you have a "function" in Maple, of which you intend to take the derivative.
That could mean some expression depending upon a name such as t
, with respect to which you intend on differentiating using Maple's diff
command. And such an expression may be assigned to alpha
, or it may contain the function call alpha(t)
.
Or perhaps you wish to treat alpha
as an operator name, and differentiate functionally with Maple's D
command.
I shall make a guess as to what you meant.
restart;
Typesetting:-Suppress(alpha(t));
Typesetting:-Settings(prime=t):
Typesetting:-Settings(typesetprime=true):
M := Matrix([[ sin(alpha(t)), exp(p*alpha(t)) ]]);
map(diff, M, t);
If that's not the kind of thing that you're after then you should explain your purpose and needs in greater detail.
Your question's title mentions a desire to have something not "evaluate". What did you mean by that? Have you perhaps assigned something to the name f
?
Upvotes: 1