0
$\begingroup$

I want to plot the following function,

enter image description here.

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

enter image description here

Here, $j_n$ is given by,

enter image description here

$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}]`
$\endgroup$
4
  • 1
    $\begingroup$ 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). $\endgroup$ Commented Sep 2, 2019 at 15:43
  • $\begingroup$ Basically, I failed to define $j_n$ $\endgroup$ Commented Sep 2, 2019 at 15:49
  • $\begingroup$ Sum[myu[m], {m, {...}}] not Sum[myu[m_], {...}}] $\endgroup$
    – m_goldberg
    Commented Sep 3, 2019 at 19:01
  • $\begingroup$ I have tried with this, but failed to generate figure. $\endgroup$ Commented Sep 5, 2019 at 13:30

1 Answer 1

1
$\begingroup$

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}

enter image description here

$\endgroup$
6
  • $\begingroup$ Thanks! How to utilize these roots(values of $j_n$ to Plot the functions? $\endgroup$ Commented Sep 2, 2019 at 21:25
  • $\begingroup$ 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. $\endgroup$
    – Dominic
    Commented Sep 3, 2019 at 11:41
  • $\begingroup$ Thanks! I am unable to find the error in my program. would you check, please? $\endgroup$ Commented Sep 3, 2019 at 13:31
  • $\begingroup$ 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. $\endgroup$
    – Dominic
    Commented Sep 3, 2019 at 14:16
  • $\begingroup$ 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}] $\endgroup$ Commented Sep 3, 2019 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.