Ask Your Question

wmaddox's profile - activity

2020-11-23 10:18:57 +0200 received badge  Scholar (source)
2020-11-23 10:18:53 +0200 received badge  Supporter (source)
2020-11-23 10:18:50 +0200 commented answer Plot ratio of Bessel functions

Thank you! What was confusing me was the scale of the output graph, with the y-axis apparently between 0.0 and 5.0 (no clues about the e6 part in the image). Now it works correctly setting an appropriate ymin and ymax as you suggested.

2020-11-23 00:57:15 +0200 received badge  Student (source)
2020-11-23 00:30:49 +0200 asked a question Plot ratio of Bessel functions

I am new to SageMath and to this page. I'm running this version:

SageMath version 9.2, Release Date: 2020-10-24 Using Python 3.8.5.

I tried to plot the ratio of two functions related to Bessel functions.

First I defined f as the first derivative of bessel_J(1, x) and gas x*bessel_J(1, x):

f(x) = bessel_J(1, x)
g = derivative(f, x)

Then I defined h as their ratio:

h = g / (x*f)

Then, I tried to plot h with:

plot(h, (x, 0, 10))

The result is an empty plot, showing only the x, y axes, and this is not correct.

Am I doing something wrong? Is it possible to plot such a function and, if yes, how?