# Plotting an infinite series for implicitely given parameters

I want to plot the following function,

.

Here, $$F_1$$ and $$F_2$$ given by,

Here, $$j_n$$ is given by,

$$R$$, $$R_0$$, $$\beta$$, $$\tau$$ and $$h$$ are known parameters. I want to plot $$U$$ by $$Y$$. I have tried following, but failed to generate figure

k = 0.1;
myj = j /. FindRoot[Tan[j] == -2 k j/(1 - k^2 j^2), {j, #}] & /@ Range[4.1, 22.1, 2]
myf1[m_] = (Sin[m ] + k m  Cos[m]) Cos[m Y] - (Cos[m ] - k m  Sin[m]) Sin[m Y]
myf2[m_] = (m^4/4 + 1)* (k (k + 1) Sin[m] - (1 + 2 k - k^2 m^2)* (Cos[m]/(2  m)))
myu[m_] = 0.25 [myf1/myf2]*Exp[-n^2]
Sum[myu[m_], {m, {2.62768, 5.30732, 8.06714, 10.9087, 13.8192,
13.8192, 16.7827, 19.7855, 19.7855, 22.8173}}]
Plot[Out[105], {Y, -10, 10}]$$$$

• What have you tried? Please share the code in copyable form, so that other users can play with it. No one wants to retype all this code (and double check for correct transition). – Mariusz Iwaniuk Sep 2 '19 at 15:43
• Basically, I failed to define $j_n$ – Moslem Uddin Sep 2 '19 at 15:49
• Sum[myu[m], {m, {...}}] not Sum[myu[m_], {...}}] – m_goldberg Sep 3 '19 at 19:01
• I have tried with this, but failed to generate figure. – Moslem Uddin Sep 5 '19 at 13:30

Seems $$j_n$$ is defined by expression: $$\tan(j_n)=\frac{2 k j_n}{1-k^2 j_n^2}$$. So need to solve for the intersections of the plots given by

k=4
Plot[{Tan[j], -2 k j/(1 - k^2 j^2)}, {j, -20, 20}, PlotRange -> 20]


shown below. Can do this numerically via FindRoot. Here are 9 of them (picked up one twice so will need to adjust accordingly FindRoot) using $$\beta/h=1/4$$ and I assume there is one more greater than zero I missed around j=2.

k=1/4;
myj = j /. FindRoot[Tan[j] == -2 k j/(1 - k^2 j^2),
{j, #}] & /@
Range[4.1, 22.1, 2]


{4.57786,7.28719,10.174,10.174,13.1567,13.1567,16.1923,19.2591,19.2591,22.3454}

• Thanks! How to utilize these roots(values of $j_n$ to Plot the functions? – Moslem Uddin Sep 2 '19 at 21:25
• First need to figure out precisely which roots you need in the expression above. As you can see from the plot, there are negative and positive roots. Then need to write a function say myRoot[n_] to return the roots but that would require some work with FindRoot as they approach zero and would have problems detecting them at some point, then create functions myF1[n_],myF2[n] then put it all together in a summation function myU. – Dominic Sep 3 '19 at 11:41
• Thanks! I am unable to find the error in my program. would you check, please? – Moslem Uddin Sep 3 '19 at 13:31
• I cannot. Your thread has been put on hold because you've supplied no Mathematica code and the problem is not clear. For example which roots? Also, if you're not familiar with programming in Mathematica, then I recommend you put this problem on hold and do simpler problems first like just summing numbers 1 through 100, using FindRoot to find roots to a quadratic equation, making simple functions, and then slowly building up your experience and then do this problem. – Dominic Sep 3 '19 at 14:16
• k = 0.1; myj = j /. FindRoot[Tan[j] == -2 k j/(1 - k^2 j^2), {j, #}] & /@ Range[4.1, 22.1, 2]myf1[m_] = (Sin[m ] + k m Cos[m]) Cos[ m Y] - (Cos[m ] - k m Sin[m]) Sin[m Y]myf2[m_] = (m^4/4 + 1)* (k (k + 1) Sin[m] - (1 + 2 k - k^2 m^2)* (Cos[m]/(2 m)))myu[m_] = 0.25 [myf1/myf2]*Exp[-n^2*5]Sum[myu[m_], {m, {2.62768, 5.30732, 8.06714, 10.9087, 13.8192, 13.8192, 16.7827, 19.7855, 19.7855, 22.8173}}]Plot[Out[105], {Y, -10, 10}]` – Moslem Uddin Sep 3 '19 at 15:13