フィルターのクリア

How to solve an equation equal to zero?

44 ビュー (過去 30 日間)
Emilia
Emilia 2022 年 7 月 28 日
コメント済み: Emilia 2022 年 7 月 28 日
Hello,
I want to solve this equation equal to zero to find the theta, But it doesn't give me an answer there is an error. How to do it, thanks for the help.
eqn=sind(45)*sind(45+thtea)+sind(45+thtea)*sind(45+thtea)+cosd(45)*cos(45+thtea)+cosd(45+thtea)*cosd(45+thtea)==0
eqn=sind(45)*sind(45+thtea)+sind(45+thtea)*sind(45+thtea)+cosd(45)*cos(45+thtea)+cosd(45+thtea)*cosd(45+thtea)
solve(eqn,thtea)

採用された回答

Walter Roberson
Walter Roberson 2022 年 7 月 28 日
There are at least 84 solutions, possibly more. Are you expecting to get a closed form solution that lists each of the angles that satisfies the equation? Because that is not going to happen -- trig equations seldom have closed form solutions.
Notice that your cos^2 and sin^2 add up to 1.
And notice that you have cos(45+thtea) instead of cosd(45+thtea) at one point.
syms thtea real
eqn=sind(45)*sind(45+thtea)+sind(45+thtea)*sind(45+thtea)+cosd(45)*cos(45+thtea)+cosd(45+thtea)*cosd(45+thtea)==0
eqn = 
simplify(eqn)
ans = 
solve(eqn)
Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.
ans = 
vpasolve(eqn)
ans = 
fplot([lhs(eqn)-rhs(eqn),0], [-360, 360])
fplot([lhs(eqn)-rhs(eqn),0], [-225, -70])
eqn2 = sind(45)*sind(45+thtea)+sind(45+thtea)*sind(45+thtea)+cosd(45)*cosd(45+thtea)+cosd(45+thtea)*cosd(45+thtea)==0
eqn2 = 
eqn2 = simplify(eqn2)
eqn2 = 
sol2 = solve(eqn2, 'returnconditions', true)
sol2 = struct with fields:
thtea: 360*k + 180 parameters: k conditions: in(k, 'integer')
sol2.thtea
ans = 
sol2.conditions
ans = 
  1 件のコメント
Emilia
Emilia 2022 年 7 月 28 日
Ok thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by