Ask Your Question
0

Solve equation 1/3*x + sin(2*x)==1

asked 2013-12-15 03:26:48 +0100

Hi all.

I have the equations

y - 1 == 0,
y == 1/3*x + sin(2*x)

and I want solutions. I know by the intermediate value theorem that there are two solutions : about x=0.5 and x=1.25. I'd like Sage to give me these solutions. I already tried to_poly_solve=True and/or explicit_solutions=True.

As an example of failure :

sage: solve(  1/3*x + sin(2*x)==1,x,explicit_solutions=True  )
[]

What can I do ?

Thanks Laurent Claessens

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-12-15 07:44:38 +0100

tmonteil gravatar image

updated 2013-12-15 07:46:18 +0100

The function solve() aims at finding solutions symbolically, and it seems that Sage is not able to do it for your equation. If you want to solve your equation numerically, you can use the function find_root() as follows:

sage: find_root(1/3*x + sin(2*x) - 1, 0, 1)
0.49428348982550824
sage: find_root(1/3*x + sin(2*x) - 1, 1, 2)
1.261800196654962
edit flag offensive delete link more

Comments

Thanks for your answer, tmonteil. That solves the equation with enough accuracy for my purpose but it does not solves my full problem because I have a system. Ultimately I would like to know the intersection points of two curves. In my example the second curve was too easy : y-1=0. Since many painting softwares are able to fill the region between two curves (e.g. pstricks), I guess this is possible ...

Laurent Claessens gravatar imageLaurent Claessens ( 2013-12-20 05:43:02 +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

Stats

Asked: 2013-12-15 03:26:48 +0100

Seen: 560 times

Last updated: Dec 15 '13