6 edited tags
| link
5 Typos
source | link

I want to plot the following indefinite integral :

$C_l^{CC}=\int k^2\mathrm{d}k\: [e^{-2k^{2}}P_{Cl}^2(k\eta)|\dot{h}(\eta)|^2]$

with k from 0 to some large value (considered to be $\infty$), where:

$P_{Cl}(k\eta) = \frac{2(l+2)}{(2l+1)}j_{l-1}(k\eta) - \frac{2(l-1)}{2l+1} j_{l+1}(k\eta)$

$\dot{h}(\eta) = r^{1/2} [A_1j_2(k\eta)+A_2y_2(k\eta)]$

where

$A_1=\frac{3k-k\cos{2k}+2\sin{2k}}{2k^2}$

$A_2 = \frac{2-2\cos{2k}-k-2k^2}{2k^2}$

$j_l$ are the spherical Bessel functions and $y_l$ are spherical Neumann functions. $\eta$ may be set to $0.0195$. I would like to do a LogLogPlot of the above integral with $l$ on the x axis and maybe even manipulate over the values $r=0.01,0.1,0.3$. However NIntegrate took an exceedingly long time to evaluate the integral and returned nothing after several minutes of waiting. What approach should i take now for plotting ?

Edit : New error for the moment with the codes i tried

p[l_, k_] := (2 (l + 2))/(2 l + 1) SphericalBesselJ[l - 1, k] - (2 (l - 1))/(2 l + 1) SphericalBesselJ[l + 1, k]
d[k_] := (1/2)(E^(-2 k^2))
a[k_] := (3 k - k Cos[2 k] + 2 Sin[2 k])/(2 k^2)
b[k_] := (2 - 2 Cos[2 k] - k Sin[2 k] - 2 k^2)/(2 k^2)
h[k_] := k(a[k] SphericalBesselJ[2, k] + b[k] SphericalBesselY[2, k])
NIntegrate[k^2 (d[k])^2 (p[l, k])^2 (h[k])^2 /. l -> 1, {k, 0.1, 10}]

$\eta$ is set to $1$ for simplicity. And yeah i haven't even plotted yet. Just tried to integrate.

Edit #2 : Thanks to @Koen for pointing errors in code. After successful NIntegrate I tried to plot the results

ListLogLinearPlot[Table[NIntegrate[-k^2ListLogLinearPlot[Table[NIntegrate[k^2 (d[k])^2 (p[l, k])^2 (h[k])^2, {k, 110, 10100}],{l, 0.1, 50, 0.1}], Joined -> True, AxesLabel -> Automatic,Frame -> True, Axes -> False]

Plot try #1enter image description here

But I was expecting something like this (according to textbooks) Expected Where could I have gone wrong ?

I want to plot the following indefinite integral :

$C_l^{CC}=\int k^2\mathrm{d}k\: [e^{-2k^{2}}P_{Cl}^2(k\eta)|\dot{h}(\eta)|^2]$

with k from 0 to some large value (considered to be $\infty$), where:

$P_{Cl}(k\eta) = \frac{2(l+2)}{(2l+1)}j_{l-1}(k\eta) - \frac{2(l-1)}{2l+1} j_{l+1}(k\eta)$

$\dot{h}(\eta) = r^{1/2} [A_1j_2(k\eta)+A_2y_2(k\eta)]$

where

$A_1=\frac{3k-k\cos{2k}+2\sin{2k}}{2k^2}$

$A_2 = \frac{2-2\cos{2k}-k-2k^2}{2k^2}$

$j_l$ are the spherical Bessel functions and $y_l$ are spherical Neumann functions. $\eta$ may be set to $0.0195$. I would like to do a LogLogPlot of the above integral with $l$ on the x axis and maybe even manipulate over the values $r=0.01,0.1,0.3$. However NIntegrate took an exceedingly long time to evaluate the integral and returned nothing after several minutes of waiting. What approach should i take now for plotting ?

Edit : New error for the moment with the codes i tried

p[l_, k_] := (2 (l + 2))/(2 l + 1) SphericalBesselJ[l - 1, k] - (2 (l - 1))/(2 l + 1) SphericalBesselJ[l + 1, k]
d[k_] := (1/2)(E^(-2 k^2))
a[k_] := (3 k - k Cos[2 k] + 2 Sin[2 k])/(2 k^2)
b[k_] := (2 - 2 Cos[2 k] - k Sin[2 k] - 2 k^2)/(2 k^2)
h[k_] := k(a[k] SphericalBesselJ[2, k] + b[k] SphericalBesselY[2, k])
NIntegrate[k^2 (d[k])^2 (p[l, k])^2 h[k] /. l -> 1, {k, 0.1, 10}]

$\eta$ is set to $1$ for simplicity. And yeah i haven't even plotted yet. Just tried to integrate.

Edit #2 : Thanks to @Koen for pointing errors in code. After successful NIntegrate I tried to plot the results

ListLogLinearPlot[Table[NIntegrate[-k^2 (d[k])^2 (p[l, k])^2 h[k], {k, 1, 10}],{l, 0.1, 50, 0.1}], Joined -> True, AxesLabel -> Automatic,Frame -> True, Axes -> False]

Plot try #1

But I was expecting something like this (according to textbooks) Expected Where could I have gone wrong ?

I want to plot the following indefinite integral :

$C_l^{CC}=\int k^2\mathrm{d}k\: [e^{-2k^{2}}P_{Cl}^2(k\eta)|\dot{h}(\eta)|^2]$

with k from 0 to some large value (considered to be $\infty$), where:

$P_{Cl}(k\eta) = \frac{2(l+2)}{(2l+1)}j_{l-1}(k\eta) - \frac{2(l-1)}{2l+1} j_{l+1}(k\eta)$

$\dot{h}(\eta) = r^{1/2} [A_1j_2(k\eta)+A_2y_2(k\eta)]$

where

$A_1=\frac{3k-k\cos{2k}+2\sin{2k}}{2k^2}$

$A_2 = \frac{2-2\cos{2k}-k-2k^2}{2k^2}$

$j_l$ are the spherical Bessel functions and $y_l$ are spherical Neumann functions. $\eta$ may be set to $0.0195$. I would like to do a LogLogPlot of the above integral with $l$ on the x axis and maybe even manipulate over the values $r=0.01,0.1,0.3$. However NIntegrate took an exceedingly long time to evaluate the integral and returned nothing after several minutes of waiting. What approach should i take now for plotting ?

Edit : New error for the moment with the codes i tried

p[l_, k_] := (2 (l + 2))/(2 l + 1) SphericalBesselJ[l - 1, k] - (2 (l - 1))/(2 l + 1) SphericalBesselJ[l + 1, k]
d[k_] := (1/2)(E^(-2 k^2))
a[k_] := (3 k - k Cos[2 k] + 2 Sin[2 k])/(2 k^2)
b[k_] := (2 - 2 Cos[2 k] - k Sin[2 k] - 2 k^2)/(2 k^2)
h[k_] := k(a[k] SphericalBesselJ[2, k] + b[k] SphericalBesselY[2, k])
NIntegrate[k^2 (d[k])^2 (p[l, k])^2 (h[k])^2 /. l -> 1, {k, 0.1, 10}]

$\eta$ is set to $1$ for simplicity. And yeah i haven't even plotted yet. Just tried to integrate.

Edit #2 : Thanks to @Koen for pointing errors in code. After successful NIntegrate I tried to plot the results

ListLogLinearPlot[Table[NIntegrate[k^2 (d[k])^2 (p[l, k])^2 (h[k])^2, {k, 10, 100}],{l, 0.1, 50}], Joined -> True, AxesLabel -> Automatic,Frame -> True, Axes -> False]

enter image description here

But I was expecting something like this (according to textbooks) Expected Where could I have gone wrong ?

4 Image size reduced and minor typo corrected
source | link

I want to plot the following indefinite integral :

$C_l^{CC}=\int k^2\mathrm{d}k\: [e^{-2k}P_{Cl}^2(k\eta)|\dot{h}(\eta)|^2]$$C_l^{CC}=\int k^2\mathrm{d}k\: [e^{-2k^{2}}P_{Cl}^2(k\eta)|\dot{h}(\eta)|^2]$

with k from 0 to some large value (considered to be $\infty$), where:

$P_{Cl}(k\eta) = \frac{2(l+2)}{(2l+1)}j_{l-1}(k\eta) - \frac{2(l-1)}{2l+1} j_{l+1}(k\eta)$

$\dot{h}(\eta) = r^{1/2} [A_1j_2(k\eta)+A_2y_2(k\eta)]$

where

$A_1=\frac{3k-k\cos{2k}+2\sin{2k}}{2k^2}$

$A_2 = \frac{2-2\cos{2k}-k-2k^2}{2k^2}$

$j_l$ are the spherical Bessel functions and $y_l$ are spherical Neumann functions. $\eta$ may be set to $0.0195$. I would like to do a LogLogPlot of the above integral with $l$ on the x axis and maybe even manipulate over the values $r=0.01,0.1,0.3$. However NIntegrate took an exceedingly long time to evaluate the integral and returned nothing after several minutes of waiting. What approach should i take now for plotting ?

Edit : New error for the moment with the codes i tried

p[l_, k_] := (2 (l + 2))/(2 l + 1) SphericalBesselJ[l - 1, k] - (2 (l - 1))/(2 l + 1) SphericalBesselJ[l + 1, k]
d[k_] := (1/2)(E^(-2 k^2))
a[k_] := (3 k - k Cos[2 k] + 2 Sin[2 k])/(2 k^2)
b[k_] := (2 - 2 Cos[2 k] - k Sin[2 k] - 2 k^2)/(2 k^2)
h[k_] := k(a[k] SphericalBesselJ[2, k] + b[k] SphericalBesselY[2, k])
NIntegrate[k^2 (d[k])^2 (p[l, k])^2 h[k] /. l -> 1, {k, 0.1, 10}]

$\eta$ is set to $1$ for simplicity. And yeah i haven't even plotted yet. Just tried to integrate.

Edit #2 : Thanks to @Koen for pointing errors in code. After successful NIntegrate I tried to plot the results

ListLogLinearPlot[Table[NIntegrate[-k^2 (d[k])^2 (p[l, k])^2 h[k], {k, 1, 10}],{l, 0.1, 50, 0.1}], Joined -> True, AxesLabel -> Automatic,Frame -> True, Axes -> False]

Plot try #1

But I was expecting something like this (according to textbooks) enter image description here

Where Expected Where could I have gone wrong ?

I want to plot the following indefinite integral :

$C_l^{CC}=\int k^2\mathrm{d}k\: [e^{-2k}P_{Cl}^2(k\eta)|\dot{h}(\eta)|^2]$

with k from 0 to some large value (considered to be $\infty$), where:

$P_{Cl}(k\eta) = \frac{2(l+2)}{(2l+1)}j_{l-1}(k\eta) - \frac{2(l-1)}{2l+1} j_{l+1}(k\eta)$

$\dot{h}(\eta) = r^{1/2} [A_1j_2(k\eta)+A_2y_2(k\eta)]$

where

$A_1=\frac{3k-k\cos{2k}+2\sin{2k}}{2k^2}$

$A_2 = \frac{2-2\cos{2k}-k-2k^2}{2k^2}$

$j_l$ are the spherical Bessel functions and $y_l$ are spherical Neumann functions. $\eta$ may be set to $0.0195$. I would like to do a LogLogPlot of the above integral with $l$ on the x axis and maybe even manipulate over the values $r=0.01,0.1,0.3$. However NIntegrate took an exceedingly long time to evaluate the integral and returned nothing after several minutes of waiting. What approach should i take now for plotting ?

Edit : New error for the moment with the codes i tried

p[l_, k_] := (2 (l + 2))/(2 l + 1) SphericalBesselJ[l - 1, k] - (2 (l - 1))/(2 l + 1) SphericalBesselJ[l + 1, k]
d[k_] := (1/2)(E^(-2 k^2))
a[k_] := (3 k - k Cos[2 k] + 2 Sin[2 k])/(2 k^2)
b[k_] := (2 - 2 Cos[2 k] - k Sin[2 k] - 2 k^2)/(2 k^2)
h[k_] := k(a[k] SphericalBesselJ[2, k] + b[k] SphericalBesselY[2, k])
NIntegrate[k^2 (d[k])^2 (p[l, k])^2 h[k] /. l -> 1, {k, 0.1, 10}]

$\eta$ is set to $1$ for simplicity. And yeah i haven't even plotted yet. Just tried to integrate.

Edit #2 : Thanks to @Koen for pointing errors in code. After successful NIntegrate I tried to plot the results

ListLogLinearPlot[Table[NIntegrate[-k^2 (d[k])^2 (p[l, k])^2 h[k], {k, 1, 10}],{l, 0.1, 50, 0.1}], Joined -> True, AxesLabel -> Automatic,Frame -> True, Axes -> False]

Plot try #1

But I was expecting something like this (according to textbooks) enter image description here

Where could I have gone wrong ?

I want to plot the following indefinite integral :

$C_l^{CC}=\int k^2\mathrm{d}k\: [e^{-2k^{2}}P_{Cl}^2(k\eta)|\dot{h}(\eta)|^2]$

with k from 0 to some large value (considered to be $\infty$), where:

$P_{Cl}(k\eta) = \frac{2(l+2)}{(2l+1)}j_{l-1}(k\eta) - \frac{2(l-1)}{2l+1} j_{l+1}(k\eta)$

$\dot{h}(\eta) = r^{1/2} [A_1j_2(k\eta)+A_2y_2(k\eta)]$

where

$A_1=\frac{3k-k\cos{2k}+2\sin{2k}}{2k^2}$

$A_2 = \frac{2-2\cos{2k}-k-2k^2}{2k^2}$

$j_l$ are the spherical Bessel functions and $y_l$ are spherical Neumann functions. $\eta$ may be set to $0.0195$. I would like to do a LogLogPlot of the above integral with $l$ on the x axis and maybe even manipulate over the values $r=0.01,0.1,0.3$. However NIntegrate took an exceedingly long time to evaluate the integral and returned nothing after several minutes of waiting. What approach should i take now for plotting ?

Edit : New error for the moment with the codes i tried

p[l_, k_] := (2 (l + 2))/(2 l + 1) SphericalBesselJ[l - 1, k] - (2 (l - 1))/(2 l + 1) SphericalBesselJ[l + 1, k]
d[k_] := (1/2)(E^(-2 k^2))
a[k_] := (3 k - k Cos[2 k] + 2 Sin[2 k])/(2 k^2)
b[k_] := (2 - 2 Cos[2 k] - k Sin[2 k] - 2 k^2)/(2 k^2)
h[k_] := k(a[k] SphericalBesselJ[2, k] + b[k] SphericalBesselY[2, k])
NIntegrate[k^2 (d[k])^2 (p[l, k])^2 h[k] /. l -> 1, {k, 0.1, 10}]

$\eta$ is set to $1$ for simplicity. And yeah i haven't even plotted yet. Just tried to integrate.

Edit #2 : Thanks to @Koen for pointing errors in code. After successful NIntegrate I tried to plot the results

ListLogLinearPlot[Table[NIntegrate[-k^2 (d[k])^2 (p[l, k])^2 h[k], {k, 1, 10}],{l, 0.1, 50, 0.1}], Joined -> True, AxesLabel -> Automatic,Frame -> True, Axes -> False]

Plot try #1

But I was expecting something like this (according to textbooks) Expected Where could I have gone wrong ?

3 New plots added
source | link
2 Codes and new errors added
source | link
1
source | link