# Revision history [back]

### Finding roots of equation made of Bessel functions, some of which have complex arguments

I want to find the roots (values or w) for an equation of spherical Bessel functions for L = 1 and \Omega^2 = 14.28 (capital Omega, not w):

My code is:

L = 1

ome = 14.28 #MeV

w = var('w')

Arg1 = sqrt(ome*(1-w^2))

Arg2 = Isqrt(ome)w

a = -I*sqrt(1-w^2)

b = spherical_bessel_J(L-1, Arg1)

c = spherical_bessel_J(L, Arg1)

d = spherical_bessel_J(L, Arg2)+I*spherical_bessel_Y(L, Arg2)

e = spherical_bessel_J(L-1, Arg2)+I*spherical_bessel_Y(L-1, Arg2)

eq = a(b/c)(d/e)-w == 0

eq.find_root(0, 1)

But I get an error on line 12, which specifies:

"TypeError: unable to convert 3.77888872553824*I to float; use abs() or real_part() as desired"

### Finding roots of equation made of Bessel functions, some of which have complex arguments

I want to find the roots (values or w) for an equation of spherical Bessel functions for L = 1 and \Omega^2 = 14.28 (capital Omega, not w):

My code is:

L = 1

ome = 14.28 #MeV

w = var('w')

Arg1 = sqrt(ome*(1-w^2))

Arg2 = Isqrt(ome)w

a = -I*sqrt(1-w^2)

b = spherical_bessel_J(L-1, Arg1)

c = spherical_bessel_J(L, Arg1)

d = spherical_bessel_J(L, Arg2)+I*spherical_bessel_Y(L, Arg2)

e = spherical_bessel_J(L-1, Arg2)+I*spherical_bessel_Y(L-1, Arg2)

eq = a(b/c)(d/e)-w == 0

eq.find_root(0, 1)

But I get an error on line 12, which specifies:

"TypeError: unable to convert 3.77888872553824*I to float; use abs() or real_part() as desired"

### Finding roots of equation made of Bessel functions, some of which have complex arguments

I want to find the roots (values or w) for an equation of spherical Bessel functions for L = 1 and \Omega^2 = 14.28 (capital Omega, not w):

My code is:

L = 1

ome = 14.28 #MeV

w = var('w')

Arg1 = sqrt(ome*(1-w^2))

Arg2 = Isqrt(ome)w

a = -I*sqrt(1-w^2)

b = spherical_bessel_J(L-1, Arg1)

c = spherical_bessel_J(L, Arg1)

d = spherical_bessel_J(L, Arg2)+I*spherical_bessel_Y(L, Arg2)

e = spherical_bessel_J(L-1, Arg2)+I*spherical_bessel_Y(L-1, Arg2)

eq = a(b/c)(d/e)-w == 0

eq.find_root(0, 1)

But I get an error on line 12, which specifies:

"TypeError: unable to convert 3.77888872553824*I to float; use abs() or real_part() as desired"

### Finding roots of equation made of Bessel functions, some of which have complex arguments

I want to find the roots (values or w) for an equation of spherical Bessel functions for L = 1 and \Omega^2 = 14.28 (capital Omega, not w):

My code is:

L = 1

ome = 14.28 #MeV

w = var('w')

Arg1 = sqrt(ome*(1-w^2))

Arg2 = Isqrt(ome)w

a = -I*sqrt(1-w^2)

b = spherical_bessel_J(L-1, Arg1)

c = spherical_bessel_J(L, Arg1)

d = spherical_bessel_J(L, Arg2)+I*spherical_bessel_Y(L, Arg2)

e = spherical_bessel_J(L-1, Arg2)+I*spherical_bessel_Y(L-1, Arg2)

eq = a(b/c)(d/e)-w == 0

eq.find_root(0, 1)

But I get an error on line 12, which specifies:

"TypeError: unable to convert 3.77888872553824*I to float; use abs() or real_part() as desired"

 5 None tmonteil 20898 ●25 ●150 ●387 http://wiki.sagemath.o...

### Finding roots of equation made of Bessel functions, some of which have complex arguments

I want to find the roots (values or w) for an equation of spherical Bessel functions for L = 1 and \Omega^2 = 14.28 (capital Omega, not w):

My code is:

L = 11
ome = 14.28 #MeV#MeV
w = var('w')var('w')
Arg1 = sqrt(ome*(1-w^2))sqrt(ome*(1-w^2))
Arg2 = Isqrt(ome)wI*sqrt(ome)*w
a = -I*sqrt(1-w^2)-I*sqrt(1-w^2)
b = spherical_bessel_J(L-1, Arg1)Arg1)
c = spherical_bessel_J(L, Arg1)Arg1)
d = spherical_bessel_J(L, Arg2)+I*spherical_bessel_Y(L, Arg2)Arg2)
e = spherical_bessel_J(L-1, Arg2)+I*spherical_bessel_Y(L-1, Arg2)Arg2)
eq = a(b/c)(d/e)-w a*(b/c)*(d/e)-w == 00
eq.find_root(0, 1)1)


But I get an error on line 12, which specifies:

"TypeError: unable to convert 3.77888872553824*I to float; use abs() or real_part() as desired"