First time here? Check out the FAQ!

Ask Your Question
0

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

asked 11 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 11 years ago

tmonteil gravatar image

updated 11 years ago

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
Preview: (hide)
link

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 ( 11 years ago )

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: 11 years ago

Seen: 588 times

Last updated: Dec 15 '13