How to solve an equation equal to zero?
131 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
采纳的回答
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
simplify(eqn)
solve(eqn)
vpasolve(eqn)
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 = simplify(eqn2)
sol2 = solve(eqn2, 'returnconditions', true)
sol2.thtea
sol2.conditions
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mathematics and Optimization 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!