# Plotting a function with Bessel zeroes and Bessel functions

I have the given function that I would like to plot:

$$$$u(r,\theta)=-\frac{2}{R\Theta Y_{n}\alpha_{n,k}}J_{n}\bigg(\frac{\alpha_{n,k}}{R}r\bigg)\sin\frac{n\pi}{\alpha}\theta$$$$

where $$R=1, \Theta=2\pi, \alpha=\pi$$ and $$\theta$$ and $$r$$ are variables.

But the problem is to use the Bessel zero, the Bessel J and Bessel Y expressions correctly

I tried to write the Bessel zero of the second kind, Y

$$$$Y_n\alpha_{n,k}$$$$

as:

 [BesselYZero[0, 1]]


Note that $$Y_n$$ is similar to $$\cos(n)$$, just that it is a Bessel function of the second kind of the integer n.
Then over to $$\alpha_{n,k}$$. These are the Bessel zeros. The equivalent zeroes for $$\cos$$ are $$n\pi+\frac{\pi}{2}$$ (as an example).

So the version of cosine would be:

Cos[Sum[n, {x, 0, k}]] (n Pi + Pi/2)


But how to write the Bessel of second kind version of this?

Then I write the Bessel function, J:

$$$$J_n\bigg(\frac{\alpha_{n,k}}{R}r\bigg)$$$$

besselj[besselJzero[0,1],r]


and then the whole expression as:

(2/(2 Pi (BesselYZero[0, 1]))) BesselJ[BesselJZero[0, 1], r] Sin[n θ]


But plotting it seems impossible, and it may be even wrongly written compared to the original formula.

Any hints? Thanks

• What it $\alpha_{n,k}$ in your formula? Below you write $\alpha=\pi$. How to understand this? Commented Aug 31, 2022 at 15:07
• It is better to include this information in your post. Not everyone reads all comments. By the way, it is quite unusual to use the notation $Y_n\alpha_{n,k}$ for zeroes of $Y_n$ Commented Aug 31, 2022 at 15:25
• For me Plot[(2/(2 Pi (BesselYZero[0, 1]))) BesselJ[BesselJZero[0, 1], r], {r,0, 10}] works. Sin[n θ] is just a constant that you need to specify. Commented Aug 31, 2022 at 16:05
• Since your function seems to depend on 2 arguments, $r$ and $\Phi$. you should use Plot3D Commented Sep 1, 2022 at 2:43
• Yes, that didn't work either. Commented Sep 1, 2022 at 7:25

Your use of BesselYZero[0,1] suggests you intend to define n=0 and k=1. This choice makes u[r,\[Theta]] equal to zero since the argument of the sine is zero.

As @yarchik notes, u is a function of two variables so you can use Plot3D or ContourPlot to visualize it.

For example, with n=1, k=1 you can write the function directly from the expression you give:

u = Block[{R = 1, \[CapitalTheta] = 2 \[Pi], \[Alpha] = \[Pi], n = 1,k = 1},
-2/(R \[CapitalTheta]  BesselYZero[n, k]) BesselJ[n, BesselJZero[n, k]/R  r] Sin[(n  \[Pi])/\[Alpha] \[Theta]]
]


Convert to numerical values for faster plots:

uN = N[u]


then plot it, e.g.,

Plot3D[uN, {r, 0, 3}, {\[Theta], 0, 2 \[Pi]}]


to get

Or try a polar plot with

ParametricPlot3D[{r  Cos[\[Theta]], r  Sin[\[Theta]], uN}, {r, 0, 3}, {\[Theta], 0, 2 \[Pi]}, BoxRatios -> {1, 1, 1/3}]