home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,333 of 10,432   
   Nasser M. Abbasi to Sam Blake   
   Re: A rational integral in Rubi   
   10 Oct 23 23:29:51   
   
   From: nma@12000.org   
      
   On 10/10/2023 11:06 PM, Sam Blake wrote:   
   > I was pleased to see the following concise result from Rubi   
   >   
   > In[8203]:= Int[(2 u + u^2)/(2 + 4 u + 2 u^2 + u^4), u]   
   > Out[8203]= ArcTan[u^2/(Sqrt[2] (1 + u))]/Sqrt[2]   
   >   
      
      
   Fyi, the rules used are (3 rules)   
      
   TraceScan[Print[#/. Rubi`Private`ShowStep[i_,___]:>i]&,Int[(2 u+u^2)/(2+4 u+2   
   u^2+u^4),u],Rubi`Private`ShowStep[i_,___]]   
   1607   
   2119   
   209   
      
   Rule 1607 is   
      
   Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol]   
     :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; FreeQ[{a, b, p, q}, x] &&   
   IntegerQ[n] && PosQ[q - p]   
      
   2119 is   
      
   Int[((x_)^(m_.)*((A_) + (B_.)*(x_)^(n_.)))/((a_) + (b_.)*(x_)^(k_.) +   
   (c_.)*(x_)^(n_.) + (d_.)*(x_)^(n2_)), x_Symbol] :>   
   Dist[A^2*((m - n + 1)/(m + 1)), Subst[Int[1/(a + A^2*b*(m - n + 1)^2*x^2), x],   
   x, x^(m + 1)/(A*(m - n + 1) + B*(m + 1)*x^n)], x] /; FreeQ[{a, b, c, d, A, B,   
   m, n}, x]   
   && EqQ[n2, 2*n] && EqQ[k, 2*(m + 1)] && EqQ[a*B^2*(m + 1)^2 -   
   A^2*d*(m - n + 1)^2, 0] && EqQ[B*c*(m + 1) - 2*A*d*(m - n + 1), 0]   
      
   Rule 209 is   
      
   Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :>   
   Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a,   
   b}, x]   
   && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])   
      
      
   > My implementation of Bronstein's Risch algorithm (from Symbolic Integration   
   I) returns two arctangents   
   >   
   > In[8206]:= Risch[(2 u + u^2)/(2 + 4 u + 2 u^2 + u^4), u]   
   > Out[8206]= (ArcTan[(-1 + u)/Sqrt[2]] - ArcTan[(2 + 2 u + (-1 + u)   
   u^2)/Sqrt[2]])/Sqrt[2]   
   >   
   > and Mathematica returns the naive form   
   >   
   > In[8207]:= Integrate[(2 u + u^2)/(2 + 4 u + 2 u^2 + u^4), u]   
   > Out[8207]= 1/4 RootSum[   
   >    2 + 4 #1 + 2 #1^2 + #1^4 &, (2 Log[u - #1] #1 + Log[u - #1] #1^2)/(   
   >     1 + #1 + #1^3) &]   
   >   
   > FriCAS also returns two arctangents   
   >   
   > (8) -> integrate((2*u + u^2)/(2 + 4*u + 2*u^2 + u^4), u)   
   >   
   >                       +-+          3    2   
   >               (u - 1)\|2          u  - u  + 2 u + 2   
   >          atan(-----------) - atan(-----------------)   
   >                    2                      +-+   
   >                                          \|2   
   >     (8)  -------------------------------------------   
   >                               +-+   
   >                              \|2   
   >                                           Type: Union(Expressi   
   n(Integer),...)   
   >   
   > Perhaps there is still some room for improvement in the log to arctan   
   conversions in symbolic integrators...   
   >   
   > Sam   
      
   --Nasser   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca