Ask Your Question
3

How can i view the poles of a function more strong?

asked 2012-05-06 16:07:23 +0100

anonymous user

Anonymous

updated 2012-05-06 17:48:32 +0100

Shashank gravatar image

Hi, I'm drawing a rational function and i use plot wit detect_poles='show', but i can hardly view the poles, how can i view the poles with a best view? Here is my sagemath code:

f5(x)=(x^2+3*x+11)/(x+1)
d1f5(x) = f5.derivative(x,1)
umd15= d1f5(x).full_simplify()
print(umd15)
d2f5(x) = f5.derivative(x,2)
umd25= d2f5(x).full_simplify()
print(umd25)
Singular25=solve(umd15==0,x)
#Inflexion25=solve(umd25==0,x)
lista_singular25 = umd15.roots(x)
#lista_inflex25=umd25.roots(x)
for raiz5 in lista_singular25:
    print("Punto Singular = ({0},{1})".format(raiz5[0], f5(raiz5[0])))
#for raizz5 in lista_inflex25:
#    print("Punto Inflexión = ({0},{1})".format(raizz5[0], f5(raizz5[0])))
fig5=plot([f5(x),point(((-4,-5),(2,7),),rgbcolor=hue(1),size='40')],(-8.5,8.5),detect_poles='show', thickness=2.0, xmin=-8,xmax=8,ymin=-10,ymax=10,ticks=[1,1])
fig5 += text('P(-4,-5)', (-4.5,-5.7), color='red')
fig5 += text('Q(2,7)', (2,8), color='red')
fig5 += plot([x+2],(-8.5,8.5),color='green',linestyle='--',thickness=2.0)
fig5 += text('y=x+2', (8,8), color='red',clip='yes')
fig5.axes_labels([r'$x$', r'$\frac{(x^2+3x+11)}{(x+1)}$'])
fig5.show()

I want an improve viewing about the vertical asymptotic x=-1

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2012-05-07 22:45:06 +0100

kcrisman gravatar image

See the source code (this is version 4.8).

pole_options = {}
pole_options['linestyle'] = '--'
pole_options['thickness'] = 1
pole_options['rgbcolor'] = '#ccc'

Unfortunately, I think that the only way to change these options right now is to change it in your actual plot file! You can go into your Sage installation's devel/sage/sage/plot/plot.py file and search for these lines, and then just change them, start Sage with the command line option sage -br and hopefully a thicker line would be available.

I've opened Ticket 12921 for this issue.

edit flag offensive delete link more
0

answered 2012-05-09 14:07:22 +0100

tobal gravatar image

Thank you very much for your answer. Actually I'm using sage 4.8 packaged by Mandriva 2011.0, if I have time i'll recompile the package, if not, i'll wait the next version of sage.

edit flag offensive delete link more

Comments

Well, this won't be fixed for Sage 5.0 (whose release is imminent). But if you have gcc and a few other things on your computer, you can install from source pretty easily - http://www.sagemath.org/doc/installation/source.html for example. This won't take more than a few hours, and you can get links to the latest release candidate at http://groups.google.com/group/sage-release/

kcrisman gravatar imagekcrisman ( 2012-05-09 15:16:22 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-05-06 16:07:23 +0100

Seen: 666 times

Last updated: May 09 '12