-1
Y = 2*10^11;
Iyy = 8.333*10^-6;
L = 4;
ζ = L/2;
K = 100*(Y*Iyy)/L^3;
a = (2*β^3*Sin[β*L]*Sinh[β*L]);

(*This is my main equation*)
eq1 = 
  (1 - K/(Y*Iyy) *
    ((Sin[β*(L - ζ)]*Sin[β*ζ]*Sinh[β*L] - Sinh[β*(L - ζ)]*Sinh[β*ζ]* Sin[β*L])*1/a));

P = FullSimplify[eq1];
T = P;,
Plot[T, {β, -10, 10}]

S = FindRoot[T == 0, {β, 3}] (* finding the root at 3*)
β /. % (* printing that value*)

I first plotted that equation and later, wherever it crosses the x-axis, in that neighborhood I was trying to find the root. I used FindRoot command. This program is about finding the root of the equation P.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Nanavanalla
  • 427
  • 2
  • 8

1 Answers1

3

If you want all roots in a given domain, you can use

NSolve[T == 0 && 0 < β < 10]

Clearing the trig. denominators with

NSolve[Expand[T*Cos[2 β] Sinh[4 β]] == 0 && 0 < β < 10]

is faster.

Even faster for this example is a direct search with FindRoot, bracketing the search domain to subintervals in a partition of the domain into intervals of length less than half the smallest period of the trig. functions:

Table[Check[FindRoot[T == 0, {β, n, n, n + 1}], Nothing], {n, 9}]
(* ignore errors *)

They all return

{{β -> 2.34143}, {β -> 3.92378}, {β -> 5.49661}, {β -> 7.06803}, {β -> 8.63908}}
Michael E2
  • 235,386
  • 17
  • 334
  • 747
  • 1
    You can use Quiet[] to suppress the printing of the FindRoot errors, but I feel on this educational forum that unless the question is about suppressing them, it is better for the users to see them and think about whether they are serious or can be ignored. – Michael E2 Aug 30 '17 at 11:48
  • Thanks, MichaelE2 (best answer) and also m_goldberg. – Nanavanalla Aug 31 '17 at 15:41
  • @VijayKumarS It is a good practice to accept the most helpful answer, you know... – Henrik Schumacher Jan 08 '18 at 16:20