1.

A student has to find the solution of an equation cos(x)=1/2. She has to write the program such that exact values are shown at output. Which of the following codes would help her?

A. syms x;eqn = cos(x) == 1/2;vpa( solve(eqn,x))
B. syms x;eqn = cos(x) == 1/2;solve(eqn,x)
C. vpa(solve(‘cos(x)=1/2’))
D. syms x;eqn = cos(x) = 1/2;vpa(solve(eqn,x))
Answer» B. syms x;eqn = cos(x) == 1/2;solve(eqn,x)


Discussion

No Comment Found