# How to solve single variable nonlinear trigonometric function?

3 views (last 30 days)
Jintu K James on 6 Sep 2021
Commented: Jintu K James on 7 Sep 2021
I am trying to solve a non linear equation as given below. I am expecting β2 to be between 35 and 50 degrees. All angles are in degrees.
I tried using and using functions. But the reults were not in that range . How to solve this issure.

Abolfazl Chaman Motlagh on 6 Sep 2021
maybe you forgot to use "d" in trigonometric functions.
quick answer without optimizing the code:
m = 0.7:0.01:1 ;
b1 = 34.65 ;
theta = 16;
syms b;
f =@(b,m) m - (1-(tand(b-b1).*sind(theta))./(sind(b1).*sind(b-theta))).^2;
for i=1:numel(m)
B(i) = vpasolve(f(b,m(i)) == 0, b);
end
min(B)
ans =
34.65
max(B)
ans =
43.489918649470219406073636845804
plot(B) ##### 2 CommentsShowHide 1 older comment
Jintu K James on 7 Sep 2021
Thank you very much for the help. It worked.
I used 'd' in trignometric functions, but i forgot to put 'm' in the f =@(b,m) command while using vpasolve.