C_R

1960 Reputation

19 Badges

5 years, 281 days

MaplePrimes Activity


These are questions asked by C_R

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

I got a solution to use D as a symbol that prints well in italic. For convienience I like to have it in my favorite palette.
When I drag `&D;` from a Maple Input line to the favorites palette, the ampersand and the statement operator are removed. Copy and paste have the same effect on the pasted selection. If  these characters are removed, `&D;` becomes the differential operator D. That's not what I want.
Is it possible at all to get `&D;` or simliar expressions using special characters within left single quotes into the favorite palette?

Many formulas use a capital D to define parameters. A popular example is the second moment of area "I" of a tube. In Maple we get

Both I and D are protected symbols in Maple and are therefore printed in roman. With the "local" command, I and D can be used as unprotected symbols. However, only the unprotected "I" is printed in italic (like other symbols or names do). D is still printed in roman, which spoils Maple's excellent printout (a bit).

I hope this inconsistency can be improved one day. For the time being, I am looking for better alternatives than my workaround with a fat white space in the attachment. Are there better workarounds?

Italic_I_and_D.mw

First 18 19 20 21 22 23 24 Page 20 of 24