Re: Derivative via mathematica
- To: mathgroup@smc.vnet.net
- Subject: [mg10566] Re: Derivative via mathematica
- From: Paul Abbott <paul@physics.uwa.edu.au>
- Date: Tue, 20 Jan 1998 16:54:08 -0500
- Organization: University of Western Australia
- References: <69ncl9$8d5@smc.vnet.net>
cai wrote: > I just used mathematica for a couple of days. I am trying to compute > the derivative under mathematica. Because the function is complicated, > I like to break it down. > > f[t_] = (m/(1+Exp[1/t] +b) > > Here m and b are functions of t. Then you probably should enter this as In[1]:= f[t_] = m[t]/(1 + Exp[1/t] + b[t]) Out[1]= m[t] ----------------- 1 b[t] + Exp[-] + 1 t > What I want is if I define the values of m' and b', rewrite the f > > m' = p > b' = q // well, I dont know how to define, this is the idea > > f[t_, m[t], b[t]] = (m/(1+Exp[1/t] +b) > > then use the command D[f[t,m[t],b[t]],t] hopeful get a equation which is > the function of t, p and q. How to do that? Is this what you want (using pattern-matching and replacement rules)? In[2]:=f'[t] Out[2]= 1 Exp[-] t m[t] (b'[t] - ------) 2 m'[t] t ----------------- - --------------------- 1 1 2 b[t] + Exp[-] + 1 (b[t] + Exp[-] + 1) t t In[3]:= %/.f_[t_]:>f/.{m'->p,b'->q} Out[3]= 1 Exp[-] t m (q - ------) 2 p t -------------- - ----------------- 1 1 2 b + Exp[-] + 1 (b + Exp[-] + 1) t t Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul@physics.uwa.edu.au AUSTRALIA http://www.pd.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________