Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Your business will assume vast proportions.


sci / sci.math.symbolic / A rational integral in Rubi

SubjectAuthor
* A rational integral in RubiSam Blake
+- Re: A rational integral in RubiNasser M. Abbasi
`- Re: A rational integral in Rubiclicliclic@freenet.de

1
Subject: A rational integral in Rubi
From: Sam Blake
Newsgroups: sci.math.symbolic
Date: Wed, 11 Oct 2023 04:06 UTC
X-Received: by 2002:a05:622a:107:b0:412:2dd3:e0e4 with SMTP id u7-20020a05622a010700b004122dd3e0e4mr315597qtw.1.1696997161728;
Tue, 10 Oct 2023 21:06:01 -0700 (PDT)
X-Received: by 2002:a05:6808:2a62:b0:3af:c13c:b442 with SMTP id
fu2-20020a0568082a6200b003afc13cb442mr6899811oib.10.1696997161518; Tue, 10
Oct 2023 21:06:01 -0700 (PDT)
Path: eternal-september.org!news.eternal-september.org!border-1.nntp.ord.giganews.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math.symbolic
Date: Tue, 10 Oct 2023 21:06:00 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=139.130.209.246; posting-account=wlWA4gkAAABfPzIzZZgzF-hX5pK428zY
NNTP-Posting-Host: 139.130.209.246
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6adc5820-95f2-4f41-b391-6b44aee43f91n@googlegroups.com>
Subject: A rational integral in Rubi
From: samuel.thomas.blake@gmail.com (Sam Blake)
Injection-Date: Wed, 11 Oct 2023 04:06:01 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 33
View all headers

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]

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(Expression(Integer),...)

Perhaps there is still some room for improvement in the log to arctan conversions in symbolic integrators...

Sam

Subject: Re: A rational integral in Rubi
From: Nasser M. Abbasi
Newsgroups: sci.math.symbolic
Organization: A noiseless patient Spider
Date: Wed, 11 Oct 2023 04:29 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nma@12000.org (Nasser M. Abbasi)
Newsgroups: sci.math.symbolic
Subject: Re: A rational integral in Rubi
Date: Tue, 10 Oct 2023 23:29:51 -0500
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <ug58c0$1l64d$1@dont-email.me>
References: <6adc5820-95f2-4f41-b391-6b44aee43f91n@googlegroups.com>
Reply-To: nma@12000.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Oct 2023 04:29:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="476e50fec7ab02e1ddc159ec09e65613";
logging-data="1742989"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TMGaN/YUCCGrC681/ScjA"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:TEh0u5Zja2SL6+Qxz0xSUy034G0=
In-Reply-To: <6adc5820-95f2-4f41-b391-6b44aee43f91n@googlegroups.com>
Content-Language: en-US
View all headers

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(Expression(Integer),...)
>
> Perhaps there is still some room for improvement in the log to arctan conversions in symbolic integrators...
>
> Sam

--Nasser

Subject: Re: A rational integral in Rubi
From: clicliclic@freenet.d
Newsgroups: sci.math.symbolic
Organization: Killfiles, Unlimited
Date: Thu, 12 Oct 2023 09:38 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!usenet.ovh!weretis.net!feeder8.news.weretis.net!newsfeed.xs3.de!callisto.xs3.de!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.killfile.org!.POSTED.port-92-196-252-109.dynamic.as20676.net!not-for-mail
From: nobody@nowhere.invalid (clicliclic@freenet.de)
Newsgroups: sci.math.symbolic
Subject: Re: A rational integral in Rubi
Date: Thu, 12 Oct 2023 11:38:59 +0200
Organization: Killfiles, Unlimited
Message-ID: <6527BEB3.7D0F8289@nowhere.invalid>
References: <6adc5820-95f2-4f41-b391-6b44aee43f91n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: flea.killfile.org; posting-host="port-92-196-252-109.dynamic.as20676.net:92.196.252.109";
logging-data="263334"; mail-complaints-to="news@news.killfile.org"
X-Mailer: Mozilla 4.75 [de] (Win98; U)
X-Accept-Language: de
View all headers

Sam Blake schrieb:
>
> 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]
>
> 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(Expression(Integer),...)
>
> Perhaps there is still some room for improvement in the log to arctan
> conversions in symbolic integrators...
>

Bronstein's Risch algorithm presumably involves Rioboo's decomposition
of arc tangents to ensure continuity on the real axis (see chapter 2.8
in his Symbolic Integration I). Indeed, ATAN(u^2/(SQRT(2)*(1 + u)))/
SQRT(2) is discontinuous at x = -1. However, a user can easily change
this antiderivative to -ATAN(SQRT(2)*(1 + u)/u^2)/SQRT(2), but he then
needs a limit to evaluate it at x = 0.

Martin.

1

rocksolid light 0.9.8
clearnet tor