Re: Mathematica can't win against Tiger Woods
- To: mathgroup at smc.vnet.net
- Subject: [mg19693] Re: [mg19677] Mathematica can't win against Tiger Woods
- From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
- Date: Sat, 11 Sep 1999 16:36:01 -0400
- Sender: owner-wri-mathgroup at wolfram.com
I don't think of myself as a "computer algebra nerd" and I don't play golf but it seems to me that Mathemaitca does this problem rather well: In[2]:= solution = {y[t], x[t]} /. DSolve[{x''[t] == - (a x'[t] + b y'[t]), y''[t] == - g - (a y'[t] - b x'[t])}, {y[t], x[t]}, t]; In[3]:= Simplify[ComplexExpand[solution, TargetFunctions -> {Im, Re}]] Out[3]= 1 a t 4 3 {{---------- (E (a C[1] + a (-g t + C[3]) + 2 2 2 (a + b ) 2 2 a b (-g t + C[3]) + b (-g + b (b C[1] + C[4])) + 2 a (g + b (2 b C[1] + C[4]))) - 2 2 (a + b ) (a C[3] + b C[4]) Cos[b t] - 2 2 a t (a + b ) (-b C[3] + a C[4]) Sin[b t]) / E , 1 a t 4 3 ---------- (E (a C[2] + b (g t + b C[2] - C[3]) + 2 2 2 (a + b ) 2 3 a b (g t + 2 b C[2] - C[3]) + a C[4] + a b (-2 g + b C[4])) - 2 2 (a + b ) (-b C[3] + a C[4]) Cos[b t] + 2 2 a t (a + b ) (a C[3] + b C[4]) Sin[b t]) / E }} -- Andrzej Kozlowski Toyama International University JAPAN http://sigma.tuins.ac.jp http://eri2.tuins.ac.jp ---------- >From: "William M. MacDonald" <wm2 at umail.umd.edu> To: mathgroup at smc.vnet.net >To: mathgroup at smc.vnet.net >Subject: [mg19693] [mg19677] Mathematica can't win against Tiger Woods >Date: Thu, Sep 9, 1999, 3:19 PM > > > I want to use the study of golf drives in teaching theoretical methods. An > approximate pair of equations to get insight assumes that the drag force is > linearly proportional to velocity, instead of the actual quadratic > dependence. The equations for a ball with backspin to provide lift are > x''[t]== - (a x'[t]+b y'[t]), > y''[t]== - g - (a y'[t]- b x'[t]) > Mathematica returns a very complicated and apparently complex expression in > about 9 seconds on my 250 MHz G3 Powerbook. Simplify takes 1min and 20 > seconds and still returns an apparently complex expression. If I apply > FullSimplify on the solution for say x[t], I get no answer in 6 minutes. > > I have a PC version of another system that I can run on my Powerbook using > Virtual PC. It requires 6 seconds to deliver a lengthy but obviously real, > no Exp[(a+ I b)t] terms or (a + I b)(a - I b) terms. > > I have never been able to learn why Mathematica is so slow in solving > coupled equations and returns (as USUAL unless you use Simplify) such > inelegant results. Is there any computer algebra NERD out > there who knows the answer. (Don't tell me to use AlgebraicManipulation; I > am trying to sell Mathematica to users who don't want to spend time > learning > fancy tricks.) > > -- > William M. MacDonald > Professor of Physics > University of Maryland > > Internet: wm2 at umail.umd.edu > >