1

I am doing some symbolic manipulation and misunderstand Mathematica. The code is as such:

x[t_] := t;
y1[t_, a_, b_] := b Sqrt[1 - t^2/a^2]
\[Phi]1[t_, a_, b_] := {x[t], y1[t, a, b]};
d\[Phi]1[t_, a_, b_] := D[\[Phi]1[t, a, b], t];
t1[s_, t0_, a_, b_] := s*d\[Phi]1[t0, a, b];

If I do:

t1[1, 0, 2, 1]
(* General::ivar: 0 is not a valid variable.*)

But

t1[s, t0, a, b]

gives the correct answer symbolically.

I think what is happening is that Mathematica plugs in t0 into D[\[Phi]1[t, a, b], t] and only then it does the derivative. But then it is doing derivative with respect to t0 which is technically wrong although it results in the same thing.

I want something like (but i dont think it can work this way), also, it is extra work, but I would think this should be default.

d\[Phi]1[t_, a_, b_] := D[\[Phi]1[s, a, b], s]/.s->t (* plug the value of t after you have done the derivative!*) ;

But I want it obviously the other way, how do I tell Mathematica to do it that way. By trial and error (I have no understanding why though) I have found that a candidate to correct it might be:

t1[s_, t0_, a_, b_] = s*d\[Phi]1[t0, a, b];

But reading the manual is just confusing things more because from that I understand it that it should work exactly opposite than what it is doing. Also with the Set symbol, the t0,a,b become blue in the gui which is driving me crazy as it seems I made a typo and that they are not defined.

What is the proper way to do such symbolic manipulations?

atapaka
  • 3,954
  • 13
  • 33

0 Answers0