C_R

2540 Reputation

19 Badges

4 years, 356 days

MaplePrimes Activity


These are questions asked by C_R

 I came across this question while trying to verify the equality of expressions containing elliptic integrals.

 

That's what Maple returns for EllipticK(1)

EllipticK(1)

Error, (in EllipticK) numeric exception: division by zero

 

However

evalf(EllipticK(1.))

Float(infinity)

(1)

limit(EllipticK(k), k = 1, left)

infinity

(2)

indicate infinity.

Float(infinity) = infinity

Float(infinity) = infinity

(3)

is(Float(infinity) = infinity)

true

(4)

NULL

Download EllpticK(1).mw

I have no experience with elliptic integrals. Can I assume in this case that infinity is correct?

Evaluating this integral

Int(1/(sqrt(1-x)*sqrt(-x^2+1)), x = 0 .. 1); ((proc (x) options operator, arrow; x end proc) = value)(%)

Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity*(Pi+1)

(1)

simplify(Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity*(Pi+1))

Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity

(2)

NULL

produces an infinite product as output. Why does Maple not automatically simplify to infinity. Can the extra information (1+pi) be of any use?


Download Infinity_times_something.mw

 

The expression

f := arctan(y, x)+arctan(-y, x)

arctan(y, x)+arctan(-y, x)

(1)

simplifies to zero in the real range if y=0 is excluded.

x < 0, y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

0, true

(2)

x >= 0, y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

0, true

(3)

Combining the above assumptions as attempted bellow does not simplify to zero

x::real, y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(4)

`or`(x < 0, x >= 0), y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(5)

Or(x < 0, x >= 0), y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(6)

`and`(-infinity <= x, x <= infinity), y::real, y <> 0; `assuming`([simplify(f), is(f = 0)], [%])

arctan(y, x)+arctan(-y, x), FAIL

(7)

interface(version)

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

(8)

 

 

Download assuming_and_differently_combined_inequalities.mw

In the positive range Maple confirms that this is true.
In the real range Maple fails to provide an answer (see attachments).

Is this identity correct?

restart

kernelopts(version)

`Maple 2022.0, X86 64 WINDOWS, Mar 8 2022, Build ID 1599809`

(1)

NULL

is(arctan(-x) = -arctan(x))

true

(2)

`assuming`([is(arctan(x, y) = -arctan(-x, y))], [x::real, y::real])

FAIL

(3)

`assuming`([is(arctan(x, y) = -arctan(-x, y))], [x::positive, y::positive])

true

(4)

`assuming`([simplify(arctan(-x, y)+arctan(x, y), trig)], [x::real, y::real])

arctan(-x, y)+arctan(x, y)

(5)

But

plot3d([arctan(-x, y)+arctan(x, y)], x = -1000000 .. 1000000, y = -1000000 .. 1000000, title = arctan(-x, y)+arctan(x, y))

 

On a unit circle

x = cos(alpha), y = sin(alpha)

x = cos(alpha), y = sin(alpha)

(6)

subs(x = cos(alpha), y = sin(alpha), arctan(-x, y)+arctan(x, y))

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(7)

`assuming`([simplify(%)], [alpha::real])

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(8)

`assuming`([simplify(%)], [alpha::positive])

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(9)

`assuming`([simplify(%)], [-Pi < alpha and alpha < Pi])

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(10)

plot(arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha)), alpha = -2*Pi .. 2*Pi, axes = boxed, color = red)

 

NULL


Download arctan_xy_simplify.mw

and another maybe related case where simplification does not work

arctan_xy_simplify_2.mw

Solve produces different output in the attachment depending on how it is used. Why is that and how can simplification to arctan(y/z) be avoided? Arctan(y/z) only gives correct angles for positive y and z.  I prefer arctan(y,z) output that I can subsequently simplify to the y and z ranges of interest (if possible). Imagine “wrong” simplification of complex algebraic output (e.g., from inverse kinematics).

Arctan.mw

First 25 26 27 28 29 30 31 Page 27 of 32