# How to filter the roots of the trancedental equation in mathematica [duplicate]

ClearAll
(*I AM TRYING TO FIND THE ROOTS OF THE TRANCEDENTAL EQUATION 'S' FOR \
DIFFERENT VALUE OF 'z' AND 'k', BUT I WANT TO FILTER THE SOME ROOTS \
WHICH ARE MULTIPLES OF 'Pi'. HOW TO DO THAT*)
Y = 2*10^11;
Iyy = 8.333*10^-6;
L = 4;
z = 1/4;(*THIS IS THE FIRST PARAMETER*)
K = 10^12;(*tHIS IS THE SECOND PARAMETER*)
a = 1/(2*b^3)
eq = a*(((Sin[b*(1 - z)]*Sin[b*z])/Sin[b]) - ((
Sinh[b*(1 - z)]*Sinh[b*z])/Sinh[b]));
eq1 = (K*eq) + 1;
(*P=FullSimplify[eq1]*)
Plot[eq1, {b, 0, 120}]
(*S=NSolve[eq1\[Equal]0&&0<b<4]*)
S = FindRoot[
eq1 == 0, {b, 4*Pi}];(*THIS IS THE TRANCEDENTAL EQUATION*)
(*b=b/.%*)
om = (b/L)^2*Sqrt[(Y*Iyy)/(7850*0.1^2)] /. S[];
fn = om/(2*\[Pi])
W1 = a*(((Sin[b*(1 - z)]*Sin[b*x])/Sin[b]) - ((
Sinh[b*(1 - z)]*Sinh[b*x])/Sinh[b])) /. S[];
M1 = FindMaxValue[W1, x];
(*W1=W1/M1;*)
W2 = a*(((Sin[b*(1 - x)]*Sin[b*z])/Sin[b]) - ((
Sinh[b*(1 - x)]*Sinh[b*z])/Sinh[b])) /. S[];
M2 = FindMaxValue[W2, x];
(*W2=W2/M2;*)
Plot[Piecewise[{{W2, x >= z}, {W1, x <= z}}], {x, 0, 1}]


How to filter the roots which are multiples of pi, from the transcendental equation plot. but however, I am getting all the roots which I don't want. Is there any way out? I redid my code and uploading again.I corrected the symbolic terms Hope everything is correct. And also who Nsolve is different from Find roots. SORRY I HAVE NOT TYPED THE QUESTION PROPERLY. HOPE I HAVE POSTED THE CORRECT ONE

## marked as duplicate by Kuba♦Jan 12 '18 at 21:34

• Comments are not for extended discussion; this conversation has been moved to chat. – Kuba Jan 12 '18 at 21:31

If you want to eliminate the lines on the plot you can use Exclusions:

Plot[eq1, {b, 0, 10}, Exclusions -> Table[ n Pi, {n, 100}]]


or

Plot[eq1, {b, 0, 10}, Exclusions -> 1/eq1==0 ]] • This is what I am looking for, Thanks – Vijay Kumar S Jan 12 '18 at 18:05
• Ah, it was hard to guess that this was OP's issue since my Mathematica version (11.0.1) plots Plot[eq1, {b, 0, 10}] exactly as Plot[eq1, {b, 0, 10}, Exclusions -> 1/eq1==0 ]]. – Henrik Schumacher Jan 12 '18 at 21:12
• Thanks a lot sir. – Vijay Kumar S Jan 13 '18 at 4:25