Skip to content

sage fails to plot a quarter circle when it should #7165

@sagetrac-fmaltey

Description

@sagetrac-fmaltey

I use sage 4.1.2alpha4. This plot is right with this version :

parametric_plot([real(exp(i*m)),imaginary(exp(i*m))],m,0,7)

I apply the patch 7122 by copy/paste in emacs and run sage -br.
Now this plot is also right, it draw a half-circle :

parametric_plot([real(m+sqrt(m<sup>2-1)),imaginary(m+sqrt(m</sup>2-1))],m,-5,5)

I also get it by this function :

def solve2pplot (eq) : return [real(eq.rhs()),imaginary(eq.rhs())]
res = solve(z^2+2*m*z+1,z)
parametric_plot (solve2pplot (res[0]), m, -5,5)

Now I solve this 4 degree equation. The solve is right with sqrt at 2 levels.

But I get an error in the parametric_plot :

res = solve(z^4+2*m*z^2+1,z)
parametric_plot (solve2pplot (res[0]), m, -5,5)

The local solve2pplot(res[0]) generates a long formula.

real axe and imaginary axe are right.

But sage doesn't plot the quarter-circle between axes at position 1=(1,0) and i=(0,1) and claims failed to evaluate function at 40 points. So the plot is a line between the 2 axes.

CC: @kcrisman

Component: graphics

Author: Frédéric Chapoton

Branch/Commit: 354f929

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/7165

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions