<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, How do I change the branch cut definition for the sqrt function?</title>
    <link>http://www.mapleprimes.com/questions/123075-How-Do-I-Change-The-Branch-Cut-Definition</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Sat, 13 Jun 2026 03:49:15 GMT</lastBuildDate>
    <pubDate>Sat, 13 Jun 2026 03:49:15 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, How do I change the branch cut definition for the sqrt function?</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, How do I change the branch cut definition for the sqrt function?</title>
      <link>http://www.mapleprimes.com/questions/123075-How-Do-I-Change-The-Branch-Cut-Definition</link>
    </image>
    <item>
      <title>Branch cut</title>
      <link>http://www.mapleprimes.com/questions/123075-How-Do-I-Change-The-Branch-Cut-Definition?ref=Feed:MaplePrimes:How do I change the branch cut definition for the sqrt function?:Comments#answer123082</link>
      <itunes:summary>&lt;p&gt;To obtain a square root function where the branch cut is at arg(z) = t, you can try&lt;br&gt;&lt;br&gt;&amp;gt; mysqrt:= (t,z) -&amp;gt; sqrt(-z*exp(-I*t))/sqrt(-exp(-I*t));&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;To obtain a square root function where the branch cut is at arg(z) = t, you can try&lt;br&gt;&lt;br&gt;&amp;gt; mysqrt:= (t,z) -&amp;gt; sqrt(-z*exp(-I*t))/sqrt(-exp(-I*t));&lt;/p&gt;</description>
      <guid>123082</guid>
      <pubDate>Wed, 22 Jun 2011 04:40:14 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>sqrt(z^4 - E)</title>
      <link>http://www.mapleprimes.com/questions/123075-How-Do-I-Change-The-Branch-Cut-Definition?ref=Feed:MaplePrimes:How do I change the branch cut definition for the sqrt function?:Comments#answer123093</link>
      <itunes:summary>&lt;p&gt;You only have residues at isolated singularities, not at branch points.&lt;br&gt;&lt;br&gt;Let E = b^4 with b &amp;gt; 0.&lt;br&gt;In this case, I don't see how "any branch cut that is not on the real axis would be fine", but if you take your function as z* sqrt(b^2+z^2) * sqrt(1 - b^2/z^2) , with the principal branch of sqrt, you'll have branch cuts on the line segment [-b,b] of the real axis and [b,infinity)*I and (-infinity, -b]*I on the imaginary axis.&amp;nbsp; You could then take a contour such as the ellipse (x/a)^2 + (y/c)^2 = 1 with a &amp;gt; b &amp;gt; c and not meet a branch cut.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You only have residues at isolated singularities, not at branch points.&lt;br&gt;&lt;br&gt;Let E = b^4 with b &amp;gt; 0.&lt;br&gt;In this case, I don't see how "any branch cut that is not on the real axis would be fine", but if you take your function as z* sqrt(b^2+z^2) * sqrt(1 - b^2/z^2) , with the principal branch of sqrt, you'll have branch cuts on the line segment [-b,b] of the real axis and [b,infinity)*I and (-infinity, -b]*I on the imaginary axis.&amp;nbsp; You could then take a contour such as the ellipse (x/a)^2 + (y/c)^2 = 1 with a &amp;gt; b &amp;gt; c and not meet a branch cut.&lt;/p&gt;</description>
      <guid>123093</guid>
      <pubDate>Wed, 22 Jun 2011 09:57:22 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>Completing the calculation</title>
      <link>http://www.mapleprimes.com/questions/123075-How-Do-I-Change-The-Branch-Cut-Definition?ref=Feed:MaplePrimes:How do I change the branch cut definition for the sqrt function?:Comments#answer123115</link>
      <itunes:summary>&lt;p&gt;Substitution z=b*w reduces that to the case with b=1. Now, taking the contour close to the real axis, (x+I*y), sqrt((x^2+I*y)^2+1), and sqrt(1-1/(x+I*y)^2) with small y have the same sign of the imaginary part as the sign of y, and the first 2 of these imaginary parts are small, so that product also will have the same sign of the imaginary part as the sign of y.&lt;/p&gt;
&lt;p&gt;The sign of the imaginary part of sqrt(z^4-1) is positive for real z on the interval between -1 and 1. That means that the integral over the bottom part of the contour (close to the real axis), oriented counterclockwise, will be close to the -int(sqrt(x^4-1),x=-1..1), and the same for the integral over the top part of that contour. Taking the limit, our contour integral (with b=1) equals&lt;/p&gt;
&lt;pre&gt;-2*int(sqrt(x^4-1),x=-1..1)=-4*int(sqrt(x^4-1),x=0..1);

                                  1/2
                   1/2           2
           -4/3 I 2    EllipticK(----) = -I Beta(1/4, 3/2)
                                  2
&lt;/pre&gt;
&lt;p&gt;which we can also express in terms of &amp;Gamma;,&lt;/p&gt;
&lt;pre&gt;convert(rhs(%),GAMMA);

                                   3/2  1/2
                          -2/3 I Pi    2
                          -----------------
                                       2
                             GAMMA(3/4)
&lt;/pre&gt;
&lt;p&gt;And in the general case the answer will be that expression multiplied by b^3 = E^(3/4).&lt;/p&gt;
&lt;p&gt;If the originally chosen function had the opposite sign, i.e. if it was -z*sqrt(b^2+z^2)*sqrt(1-z^2/b^2), the sign of the (imaginary part of the) contour integral would be opposite as well.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;
&lt;p&gt;PS By the way, this expression of EllipticK(1/sqrt(2)) through GAMMA(3/4) seems to be unknown to simplify,&lt;/p&gt;
&lt;pre&gt;simplify(2*EllipticK(sqrt(2)/2)*GAMMA(3/4)^2/Pi^(3/2));

                                 1/2
                                2               2
                    2 EllipticK(----) GAMMA(3/4)
                                 2
                    -----------------------------
                                  3/2
                                Pi

evalf(%);

                             0.9999999994
&lt;/pre&gt;
&lt;p&gt;The conversion to hypergeom works though,&lt;/p&gt;
&lt;pre&gt;simplify(convert(EllipticK(1/sqrt(2)),hypergeom));

                                    3/2
                                  Pi
                           1/2 -----------
                                         2
                               GAMMA(3/4)
&lt;/pre&gt;
&lt;p&gt;but simplify doesn't use this conversion itself, even if the option hypergeom is added to it.&lt;/p&gt;
&lt;p&gt;I'm not actually suggesting to add that to simplify - but, perhaps, a new FullSimplify command could be added, working longer, perhaps, than simplify, but trying various combinations of possible simplifications.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Substitution z=b*w reduces that to the case with b=1. Now, taking the contour close to the real axis, (x+I*y), sqrt((x^2+I*y)^2+1), and sqrt(1-1/(x+I*y)^2) with small y have the same sign of the imaginary part as the sign of y, and the first 2 of these imaginary parts are small, so that product also will have the same sign of the imaginary part as the sign of y.&lt;/p&gt;
&lt;p&gt;The sign of the imaginary part of sqrt(z^4-1) is positive for real z on the interval between -1 and 1. That means that the integral over the bottom part of the contour (close to the real axis), oriented counterclockwise, will be close to the -int(sqrt(x^4-1),x=-1..1), and the same for the integral over the top part of that contour. Taking the limit, our contour integral (with b=1) equals&lt;/p&gt;
&lt;pre&gt;-2*int(sqrt(x^4-1),x=-1..1)=-4*int(sqrt(x^4-1),x=0..1);

                                  1/2
                   1/2           2
           -4/3 I 2    EllipticK(----) = -I Beta(1/4, 3/2)
                                  2
&lt;/pre&gt;
&lt;p&gt;which we can also express in terms of &amp;Gamma;,&lt;/p&gt;
&lt;pre&gt;convert(rhs(%),GAMMA);

                                   3/2  1/2
                          -2/3 I Pi    2
                          -----------------
                                       2
                             GAMMA(3/4)
&lt;/pre&gt;
&lt;p&gt;And in the general case the answer will be that expression multiplied by b^3 = E^(3/4).&lt;/p&gt;
&lt;p&gt;If the originally chosen function had the opposite sign, i.e. if it was -z*sqrt(b^2+z^2)*sqrt(1-z^2/b^2), the sign of the (imaginary part of the) contour integral would be opposite as well.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;
&lt;p&gt;PS By the way, this expression of EllipticK(1/sqrt(2)) through GAMMA(3/4) seems to be unknown to simplify,&lt;/p&gt;
&lt;pre&gt;simplify(2*EllipticK(sqrt(2)/2)*GAMMA(3/4)^2/Pi^(3/2));

                                 1/2
                                2               2
                    2 EllipticK(----) GAMMA(3/4)
                                 2
                    -----------------------------
                                  3/2
                                Pi

evalf(%);

                             0.9999999994
&lt;/pre&gt;
&lt;p&gt;The conversion to hypergeom works though,&lt;/p&gt;
&lt;pre&gt;simplify(convert(EllipticK(1/sqrt(2)),hypergeom));

                                    3/2
                                  Pi
                           1/2 -----------
                                         2
                               GAMMA(3/4)
&lt;/pre&gt;
&lt;p&gt;but simplify doesn't use this conversion itself, even if the option hypergeom is added to it.&lt;/p&gt;
&lt;p&gt;I'm not actually suggesting to add that to simplify - but, perhaps, a new FullSimplify command could be added, working longer, perhaps, than simplify, but trying various combinations of possible simplifications.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>123115</guid>
      <pubDate>Wed, 22 Jun 2011 22:56:20 Z</pubDate>
      <itunes:author>Alec Mihailovs</itunes:author>
      <author>Alec Mihailovs</author>
    </item>
  </channel>
</rss>