Ask Your Question
0

how to get simplified result of solving equation

asked 2015-08-17 19:38:14 +0100

ismon gravatar image

updated 2015-08-17 22:21:01 +0100

calc314 gravatar image

Hi there!

In a linear algebra assignment I have the following equation I need to find a solution for:

-2*sqrt(3)*sin(t)^2+2*cos(t)*sin(t)+sqrt(3)==0. I know the result is pi/3.

Now, when I use solve, solve(-2*sqrt(3)*sin(t)^2+2*cos(t)*sin(t)+sqrt(3)==0, t). I get:

[sin(t) == -1/6*sqrt(3)*(sqrt(cos(t)^2+6)-cos(t), sin(t) == 1/6*sqrt(3)*sqrt(cos(t)^2+6)+cos(t))].

How do I use the solve function to get the more simplified result?

NB: I have also tried to use find_root and different simplify functions, but also without any luck. I am new to sage, so it is quite possible that I don't know a specification to the solve function which I should use.

Thank you in advance!

Sincerly Simon

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-08-17 22:25:06 +0100

calc314 gravatar image

updated 2015-08-17 22:29:37 +0100

First, be sure to define your variable using var('t').

To find a numerical solution, you can plot the function to help identify where the roots are.

plot(-2*sqrt(3)*sin(t)^2+2*cos(t)*sin(t)+sqrt(3),(t,-10,10))

For example, to get the first positive root, you can now use find_root to find the root between 0 and 3.

find_root(-2*sqrt(3)*sin(t)^2+2*cos(t)*sin(t)+sqrt(3),-3,3)

which gives 2.6179938779914944.

For an analytic solution, you can do the following:

solve(-2*sqrt(3)*sin(x)^2+2*cos(x)*sin(x)+sqrt(3)==0, x,to_poly_solve ='force')

This gives: [x == 1/3*pi + pi*z1, x == -1/6*pi + pi*z2]

The z1 and z2 can be any integers.

(Interestingly, I could not get the solve to work with t as the variable. I'm not sure why.)

edit flag offensive delete link more

Comments

Thank you very much for your answer!

I have marked your answer as being the correct answer. I don't know if I am to give you points, but if I am, please reply of how I do this.

Sincerly Simon

ismon gravatar imageismon ( 2015-08-18 08:54:34 +0100 )edit

Thank you. The points are managed by the website automatically.

calc314 gravatar imagecalc314 ( 2015-08-19 00:21:23 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-17 19:38:14 +0100

Seen: 1,493 times

Last updated: Aug 17 '15