Borrar filtros
Borrar filtros

How can I get all possible solutions for an equation?

6 visualizaciones (últimos 30 días)
payman khayree
payman khayree el 26 de Ag. de 2014
Comentada: payman khayree el 3 de Sept. de 2014
I need to get all possible solutions for this equation:
sin(x)/x == a
for "0.2 < a < 1", it has 3 to 5 solutions but matlab functions such as "solve" and "vpasolve" only return the first solution they find. How can I get all the answers? should I use another function?
thank you all payman

Respuesta aceptada

Greg Heath
Greg Heath el 27 de Ag. de 2014
Some or all of the solutions can probably be obtained via recursion.
Given a, b=1/a and x(1), try
x(n+1) = arcsin(a*x(n))
and
x(n+1) = b*sin(x(n))
Simultaneously plotting y1= a*x and y2 = sin(x) for 0.2 <= a <= 1 will yield insight.
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 comentario
payman khayree
payman khayree el 3 de Sept. de 2014
not what I was looking for, but anyways thanks for your answers

Iniciar sesión para comentar.

Más respuestas (1)

John D'Errico
John D'Errico el 26 de Ag. de 2014
All possible solutions is in general an impossible thing for a completely general function, since there may be infinitely many such solutions.
If you know there are a finite number of solutions, and can bound them, then just sample your function on a fine enough interval, and use fzero over brackets generated by the sampling. WTP?

Categorías

Más información sobre Matrix Computations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by