Tue Feb 24 12:25:22 MST 1998 euler% math Mathematica 3.0 for Solaris Copyright 1988-96 Wolfram Research, Inc. -- Terminal graphics initialized -- In[1]:= In[2]:= In[3]:= (* ----------[ M a t h e m a t i c a ]---------- *) 0. Second In[4]:= (* ---------- Initialization ---------- *) 0. Second In[5]:= (* ---------- Indefinite Integrals ---------- *) 0. Second In[6]:= (* This integral only makes sense for x real => x |x|/2 *) 0. Second In[7]:= Integrate[Abs[x], x] 0.22 Second Out[7]= Integrate[Abs[x], x] In[8]:= Integrate[ComplexExpand[Abs[x]], x] 0.09 Second 2 x Sqrt[x ] Out[8]= ---------- 2 In[9]:= (* Calculus on a piecewise defined function *) 0. Second In[10]:= a[x_]:= If[x < 0, -x, x] 0. Second In[11]:= (* => if x < 0 then -x^2/2 else x^2/2 *) 0.01 Second In[12]:= Integrate[a[x], x] 0.01 Second Out[12]= Integrate[If[x < 0, -x, x], x] In[13]:= << Calculus`DiracDelta` 0.48 Second In[14]:= a[x_]:= -x*UnitStep[-x] + x*UnitStep[x] 0. Second In[15]:= Integrate[a[x], x] 0.35 Second 2 2 -(x UnitStep[-x]) x UnitStep[x] Out[15]= ------------------ + -------------- 2 2 In[16]:= Clear[a] 0. Second In[17]:= ( (* This would be very difficult to do by hand => 2^(1/3)/6 [1/2 log([x + 2^(1/3)]^2/[x^2 - 2^(1/3) x + 2^(2/3)]) + sqrt(3) arctan({[sqrt(3) x]/[2^(4/3) - x] or [2 x - 2^(1/3)]/[2^(1/3) sqrt(3)]}) [Gradshteyn and Ryzhik 2.126(1)] *) 1/(x^3 + 2) ) 0. Second 1 Out[17]= ------ 3 2 + x In[18]:= Integrate[%, x] 0.08 Second 2/3 -1 + 2 x ArcTan[-----------] 2/3 2/3 1/3 2 Sqrt[3] Log[2 + 2 x] Log[-2 + 2 x - 2 x ] Out[18]= ------------------- + --------------- - -------------------------- 2/3 2/3 2/3 2 Sqrt[3] 3 2 6 2 In[19]:= D[%, x] 0. Second 2/3 1/3 1 2 - 2 2 x Out[19]= -------------- - ------------------------------ + 2/3 2/3 2/3 1/3 2 3 (2 + 2 x) 6 2 (-2 + 2 x - 2 x ) 1 > ---------------------- 2/3 2 (-1 + 2 x) 3 (1 + --------------) 3 In[20]:= ( (* What a mess! Simplify it. *) Simplify[%] ) 0.08 Second 1 Out[20]= ------ 3 2 + x In[21]:= (* This integral is easy if one realizes that 4^x = (2^x)^2 => arcsinh(2^x)/log(2) [Robert Israel in sci.math.symbolic] *) 0. Second In[22]:= Integrate[2^x/Sqrt[1 + 4^x], x] 0.28 Second x 2 Out[22]= Integrate[------------, x] x Sqrt[1 + 4 ] In[23]:= (* => (-9 x^2 + 16 x - 41/5)/(2 x - 1)^(5/2) [Gradshteyn and Ryzhik 2.244(8)] *) 0. Second In[24]:= Integrate[(3*x - 5)^2/(2*x - 1)^(7/2), x] 0.13 Second -49 7 9 Out[24]= Sqrt[-1 + 2 x] (-------------- + ------------- - ------------) 3 2 4 (-1 + 2 x) 20 (-1 + 2 x) 2 (-1 + 2 x) In[25]:= Simplify[%] 0.08 Second 2 -41 + 80 x - 45 x Out[25]= ------------------ 5/2 5 (-1 + 2 x) In[26]:= (* => 1/[2 m sqrt(10)] log([-5 + e^(m x) sqrt(10)]/[-5 - e^(m x)\ > sqrt(10)]) [Gradshteyn and Ryzhik 2.314] *) 0. Second In[27]:= Integrate[1/(2*Exp[m*x] - 5*Exp[-m*x]), x] 0.1 Second 2 m x 2 m x (-5 + 2 E ) ArcTanh[Sqrt[-] E ] 5 Out[27]= -(-------------------------------------) m x -5 m x Sqrt[10] E (---- + 2 E ) m m x E In[28]:= Simplify[%] 0.09 Second 2 m x ArcTanh[Sqrt[-] E ] 5 Out[28]= -(---------------------) Sqrt[10] m In[29]:= (* => -3/2 x + 1/4 sinh(2 x) + tanh x [Gradshteyn and Ryzhik\ > 2.423(24)] *) 0. Second In[30]:= Integrate[Sinh[x]^4/Cosh[x]^2, x] 0.16 Second Sech[x] (-12 x Cosh[x] + 9 Sinh[x] + Sinh[3 x]) Out[30]= ----------------------------------------------- 8 In[31]:= FullSimplify[%] 1.44 Second -6 x + Sinh[2 x] Out[31]= ---------------- + Tanh[x] 4 In[32]:= (* This example involves several symbolic parameters => 1/sqrt(b^2 - a^2) log([sqrt(b^2 - a^2) tan(x/2) + a + b]/ [sqrt(b^2 - a^2) tan(x/2) - a - b]) (a^2 < b^2) [Gradshteyn and Ryzhik 2.553(3)] *) 0. Second In[33]:= Integrate[1/(a + b*Cos[x]), x, Assumptions -> a^2 < b^2] 0.89 Second x (a - b) Tan[-] 2 -2 ArcTanh[--------------] 2 2 Sqrt[-a + b ] Out[33]= -------------------------- 2 2 Sqrt[-a + b ] In[34]:= Simplify[D[%, x]] 0.14 Second 1 Out[34]= ------------ a + b Cos[x] In[35]:= (* The integral of 1/(a + 3 cos x + 4 sin x) can have 4 different\ > forms depending on the value of a ! [Gradshteyn and Ryzhik 2.558(4)] => (a = 3) 1/4 log[3 + 4 tan(x/2)] *) 0. Second In[36]:= Integrate[1/(3 + 3*Cos[x] + 4*Sin[x]), x] 0.2 Second x x x -Log[Cos[-]] Log[3 Cos[-] + 4 Sin[-]] 2 2 2 Out[36]= ------------ + ------------------------ 4 4 In[37]:= Simplify[%] 0.06 Second x x x -Log[Cos[-]] + Log[3 Cos[-] + 4 Sin[-]] 2 2 2 Out[37]= --------------------------------------- 4 In[38]:= (* => (a = 4) 1/3 log([tan(x/2) + 1]/[tan(x/2) + 7]) *) 0. Second In[39]:= Integrate[1/(4 + 3*Cos[x] + 4*Sin[x]), x] 0.23 Second x x x x Log[Cos[-] + Sin[-]] Log[7 Cos[-] + Sin[-]] 2 2 2 2 Out[39]= -------------------- - ---------------------- 3 3 In[40]:= Simplify[%] 0.09 Second x x x x Log[Cos[-] + Sin[-]] - Log[7 Cos[-] + Sin[-]] 2 2 2 2 Out[40]= --------------------------------------------- 3 In[41]:= (* => (a = 5) -1/[2 + tan(x/2)] *) 0. Second In[42]:= Integrate[1/(5 + 3*Cos[x] + 4*Sin[x]), x] 0.15 Second x Sin[-] 2 Out[42]= --------------------- x x 2 (2 Cos[-] + Sin[-]) 2 2 In[43]:= FullSimplify[%] 0.8 Second 1 Out[43]= ------------ x 2 + 4 Cot[-] 2 In[44]:= (* => (a = 6) 2/sqrt(11) arctan([3 tan(x/2) + 4]/sqrt(11)) *) 0. Second In[45]:= Integrate[1/(6 + 3*Cos[x] + 4*Sin[x]), x] 0.36 Second 3 4 I x x x (-- + ---) Sec[-] (4 Cos[-] + 3 Sin[-]) 6 8 I 25 25 2 2 2 (-(--) - ---) ArcTanh[---------------------------------------] 25 25 77 264 I Sqrt[--- - -----] 625 625 Out[45]= -------------------------------------------------------------- 77 264 I Sqrt[--- - -----] 625 625 In[46]:= Simplify[%] 0.51 Second x 4 + 3 Tan[-] 2 2 ArcTan[------------] Sqrt[11] Out[46]= ---------------------- Sqrt[11] In[47]:= (* => x log|x^2 - a^2| - 2 x + a log|(x + a)/(x - a)| [Gradshteyn and Ryzhik 2.736(1)] *) 0. Second In[48]:= Integrate[Log[Abs[x^2 - a^2]], x] 2 2 General::ivar: -a + x is not a valid variable. 0.11 Second 2 2 Out[48]= Integrate[Log[Abs[-a + x ]], x] In[49]:= Integrate[ComplexExpand[Log[Abs[x^2 - a^2]]], x] 0.11 Second 2 2 2 x x Log[(-a + x ) ] Out[49]= -2 x + 2 a ArcTanh[-] + ------------------ a 2 In[50]:= (* => (a x)/2 + (pi x^2)/4 - 1/2 (x^2 + a^2) arctan(x/a) [Gradshteyn and Ryzhik 2.822(4)] or (a x)/2 + 1/2 (x^2 + a^2) arccot(x/a) [Gradshteyn and Ryzhik\ > 2.853(2)] *) 0. Second In[51]:= Integrate[x*ArcCot[x/a], x] 0.06 Second 2 x 2 x x ArcCot[-] a ArcTan[-] a x a a Out[51]= --- + ------------ - ------------ 2 2 2 In[52]:= (* => [sin(5 x) Ci(2 x)]/5 - [Si(7 x) + Si(3 x)]/10 [Gradshteyn and Ryzhik 5.31(1)] *) 0. Second In[53]:= Integrate[Cos[5*x]*CosIntegral[2*x], x] 0.22 Second CosIntegral[2 x] Sin[5 x] -SinIntegral[3 x] - SinIntegral[7 x] Out[53]= ------------------------- + ------------------------------------ 5 10 In[54]:= (* => 1/2 [f(x) - g(x)]/[f(x) + g(x)] [Gradshteyn and Ryzhik\ > 2.02(25)] *) 0. Second In[55]:= Integrate[(D[f[x], x]*g[x] - f[x]*D[g[x], x])/(f[x]^2 - g[x]^2), x] 1 Power::infy: Infinite expression - encountered. 0 Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. 1 Power::infy: Infinite expression - encountered. 0 Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. 0.42 Second g[x] f'[x] - f[x] g'[x] Out[55]= Integrate[-----------------------, x] 2 2 f[x] - g[x] In[56]:= (* ---------- Quit ---------- *) 0. Second In[57]:= Quit[] real 23.30 user 8.75 sys 0.51