On Sun, Dec 14, 2008 at 03:18:10PM +0800, Aaron Yu ZHANG wrote:
>    Hi Friedrich,
> 
>    I think I made the question even more misleading by giving the previous
>    example. In fact, please look into [1]this equation. 

Ok. But I didnt change my opinion about the previous solution :-) I hope
I can explain it way. 

>    Basically, T is a function of qi and qi_dot, which can be derived. 

What you say is that:

  T: R^2 --> R

     (qi, qi_dot) |--> T(qi, qi_dot)

T maps the two real numbers (qi and qi_dot) to an other real number.
     
>    qi is a function of time,

So this is:

  qi = f(t)

Remember to school: y = f(x)   x,y are real numbers and f is the function.

Now you concatanate the functions T and f and get a new function which
depends from t:

  t |--> T( f(t), f'(t))

>    I've no problem get diff(T,qi). But I cannot derive diff(T,qi_dot)

That isnt a problem because you want derivate T with respect to the first 
and second argument (qi and qi_dot):

  T_qi (qi, qi_dot)

and

  T_qi_dot (qi, qi_dot)

The derivatives of T, namly T_qi and T_qi_dot, are also functions of
qi and qi_dot. And then you concatanate T_qi and T_qi_dot with f:

  t |--> T_qi( f(t), f'(t))

and

  t |--> T_qi_dot( f(t), f'(t)) 

These are functions which depends from t. The last function should
be derivate with respect to t to get Qj.

The point is: T and f are different function and must be concatenate 
(substitute). If this was not clear you must ask again :-)

By,

  Friedrich
 
>      Now, I have this idea:
> 
>      % isympy
>      In [1]: var('t xDot')
>      Out[1]: (t, xDot)
> 
>      In [2]: g = lambdify((x, xDot), x*xDot)
> 
>      In [3]: g(x, xDot)
>      Out[3]: x*xDot
> 
>      In [4]: g(f(t), diff(f(t), t))
>      Out[4]:
>          d
>      f(t)*──(f(t))
>          dt
> 
>      In [5]: gDot = lambdify((x, xDot), diff(g(x, xDot), xDot))
> 
>      In [6]: gDot(f(t), diff(f(t), t))
>      Out[6]: f(t)
>      By,
> 
>       Friedrich

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to