# Solving a Trigonometric parameter

I have a similar case as given before : Solving a Trigonometric function with one parameter

Let:

m = 1;
Dx = 100;
ν = 0.25;
b = 1;


and,

λ1 = Sqrt[(((m^2)*(π^2))/a^2) + Sqrt[(n*(m^2)*(π^2))/(Dx*(a^2))]];
λ2 = Sqrt[(-(((m^2)*(π^2))/a^2)) + Sqrt[(n*(m^2)*(π^2))/(Dx*(a^2))]];
ω1 = ((λ1^2) - ν*((m^2) + (π^2))/a^2);
ω2 = ((λ1^2) - ν*((m^2) + (π^2))/a^2);


Now I have the following equation,

2*ω1*ω2 + ((ω1^2) + (ω2^2))*Cosh[λ1*b]*Cos[λ2*b] -
1/(λ1*λ2)*(((λ1^2)*(ω2^2)) - ((λ2^2)*(ω1^2)))*Sinh[λ1*b]*Sin[λ2*b] ==
0


Which is needed to be solved for the smallest Value of n as a function of ratio a/b

Taking a similar solution given previously in the link I try:

solutions =
Table[{a,
Min[n /.
NSolve[2*ω1*ω2 + ((ω1^2) + (ω2^2))*Cosh[λ1*b]*Cos[λ2*b] -
1/(λ1*λ2)*(((λ1^2)*(ω2^2)) - ((λ2^2)*(ω1^2)))*Sinh[λ1*b]*
Sin[λ2*b] == 0 && 0 < n < 10, n]]}, {a, 0.1, 1, 0.1}]

ListLinePlot[solutions]


Which gives me errors

is neither a list of replacement rules nor a valid dispatch table, \
and so cannot be used for replacing. >>


I am stuck with this one, can anyone see why?

• N is a reserved symbol -- use n instead. – kglr Aug 9 '14 at 11:27
• @kguler. I have replaced 'N' with 'n' but still the same errors remain – Nikolas Aug 9 '14 at 11:33
• few more typos: you need to change Cosh*λ1*b to Cosh[λ1*b] and Sinh*λ1*b to Sinh[λ1*b]? – kglr Aug 9 '14 at 11:40
• @kguler. You are right. I have changed the typos but again I get an error. 'ReplaceAll::reps: "{NSolve[-Plus[<<2>>]^2\ Sqrt[Plus[<<2>>]]\ Cosh[Power[<<2>>]]\ Sin[Power[<<2>>]]+Plus[<<2>>]^2\ Sqrt[Plus[<<2>>]]\ Cos[Power[<<2>>]]\ Sinh[Power[<<2>>]]==0&&0<n<10,n]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. "' and then , 'General::stop: Further output of ReplaceAll::reps will be suppressed during this calculation. >>' – Nikolas Aug 9 '14 at 12:51
• The problem is that NSolve can't solve the equation, and returns unevaluated instead of a list of replacement rules. Your equation resisted my attempts at solving; perhaps someone else might shed some light. In the mean time: because Solve doesn't like inexact numbers, you should set your \[Nu] to 1/4 instead of 0.25, and change the range of the table to fractionals instead of decimals (as in the linked answer). Also, you'll need to adjust the range of n to be bigger; try plotting your equation for some values of a to get a feel for this. – Teake Nutma Aug 9 '14 at 14:23

Attacking the problem numerically gives a first insight into the solution n(a/b)

The parameters are defined as

m = 1;
Dx = 100;
ν = 0.25;
b = 1;
λ1 =
Sqrt[(((m^2)*(π^2))/a^2) + Sqrt[(n*(m^2)*(π^2))/(Dx*(a^2))]];
λ2 =
Sqrt[(-(((m^2)*(π^2))/a^2)) + Sqrt[(n*(m^2)*(π^2))/(Dx*(a^2))]];
ω1 = ((λ1^2) - ν*((m^2) + (π^2))/a^2);
ω2 = ((λ1^2) - ν*((m^2) + (π^2))/a^2);


Thus the left hand side of the equation lhs==0 becomes

lhs = 2*ω1*ω2 + ((ω1^2) + (ω2^2))*
Cosh[λ1*b]*Cos[λ2*b] -
1/(λ1*λ2)*(((λ1^2)*(ω2^2)) - \
((λ2^2)*(ω1^2)))*Sinh[λ1*b]*Sin[λ2*b]

2 (-(2.7174/a^2) + 1/10 Sqrt[n/a^2] π + π^2/a^2)^2 +
2 (-(2.7174/a^2) + 1/10 Sqrt[n/a^2] π + π^2/a^2)^2 Cos[Sqrt[
1/10 Sqrt[n/a^2] π - π^2/a^2]] Cosh[Sqrt[
1/10 Sqrt[n/a^2] π + π^2/
a^2]] - ((-(1/10 Sqrt[n/a^2] π - π^2/a^2) (-(2.7174/a^2) +
1/10 Sqrt[n/a^2] π + π^2/
a^2)^2 + (1/10 Sqrt[n/a^2] π + π^2/a^2) (-(2.7174/a^2) +
1/10 Sqrt[n/a^2] π + π^2/a^2)^2) Sin[Sqrt[
1/10 Sqrt[n/a^2] π - π^2/a^2]] Sinh[Sqrt[
1/10 Sqrt[n/a^2] π + π^2/a^2]])/(
Sqrt[1/10 Sqrt[n/a^2] π - π^2/a^2] Sqrt[
1/10 Sqrt[n/a^2] π + π^2/a^2])


Proceeding graphically, we set the parameter a (remember b=1) to a specific value, plot lhs versus n>0 and look for a root.

For example:

Plot[lhs /. a -> 1.4, {n, 0, 150}]
(* skipping the picture here *)


Now using FindRoot, and doing it for several values of a, we obtain the function n(a) numerically in points of our choice.

For instance

nn = Table[{x = k*0.1,
n /. FindRoot[0 == lhs /. a -> x, {n, 1000}] // Chop}, {k, 5, 30}]

{{0.5, 0.220413}, {0.6, 1.24648}, {0.7, 4.12018}, {0.8, 9.83904}, {0.9,
19.0693}, {1., 32.119}, {1.1, 49.0443}, {1.2, 69.7633}, {1.3,
94.1346}, {1.4, 122.002}, {1.5, 153.219}, {1.6, 187.651}, {1.7,
225.187}, {1.8, 265.732}, {1.9, 309.206}, {2., 355.544}, {2.1,
404.691}, {2.2, 456.602}, {2.3, 511.24}, {2.4, 568.573}, {2.5,
628.576}, {2.6, 691.226}, {2.7, 756.505}, {2.8, 824.397}, {2.9,
894.888}, {3., 967.969}}


Plotting the result (in log-scale for convenience)

nn1 = {#[[1]], Log[#[[2]]]} & /@ nn

{{0.5, -1.51225}, {0.6, 0.220321}, {0.7, 1.4159}, {0.8, 2.28636}, {0.9,
2.94808}, {1., 3.46945}, {1.1, 3.89272}, {1.2, 4.24511}, {1.3,
4.54473}, {1.4, 4.80404}, {1.5, 5.03187}, {1.6, 5.23458}, {1.7,
5.41693}, {1.8, 5.58249}, {1.9, 5.73401}, {2., 5.87365}, {2.1,
6.00312}, {2.2, 6.12381}, {2.3, 6.23684}, {2.4, 6.34313}, {2.5,
6.44346}, {2.6, 6.53847}, {2.7, 6.62871}, {2.8, 6.71465}, {2.9,
6.7967}, {3., 6.8752}}

ListPlot[Log[nn1], AxesLabel -> {"a", "Log[n]"}]
(* again skipping the picture here *)


Hope this helps. Best regards, Wolfgang

• @ Mr. Wizard, sorry to cause you so much work when editing my post converting the Greeks. Next time I'll do it myself, although I don't know a clever way to do it. I simply take a Greek letter from some correct old Text, e.g. from this editied answer, copy it and paste it one-by-one into my new text. That should be possible much easier, could you tell me how? Thanks in advance. – Dr. Wolfgang Hintze Aug 17 '14 at 12:54