Solving Real Roots with NSolve and Plotting a Bifurcation Diagram

Click For Summary
SUMMARY

The discussion focuses on using the NSolve function in Mathematica to find real roots of the polynomial equation (x - 1)(x^2 + 3)(x^4 + 5) == 0. The user successfully retrieves real roots by employing the Cases function to filter out imaginary results, yielding the real root {1.}. Additionally, the user seeks guidance on plotting a bifurcation diagram, indicating a need for functions that can visualize data derived from the roots.

PREREQUISITES
  • Familiarity with Mathematica 12.0 syntax and functions
  • Understanding of polynomial equations and their roots
  • Knowledge of complex vs. real numbers
  • Basic concepts of bifurcation diagrams in dynamical systems
NEXT STEPS
  • Explore the use of the Cases function in Mathematica for filtering results
  • Learn how to implement the Plot function in Mathematica for visualizing bifurcation diagrams
  • Research the implications of real versus complex roots in polynomial equations
  • Investigate additional Mathematica functions for data visualization
USEFUL FOR

Mathematics students, researchers in dynamical systems, and anyone using Mathematica for solving polynomial equations and visualizing mathematical concepts.

jemma
Messages
35
Reaction score
0
Hi, I'm using NSolve in Mathematica but I only want to find the roots that are real numbers as my answer gives a lot of imaginary numbers. How can I do this?

I want to then plot a birfucation diagram using a table of data. Is there a function to do this?

Thanks!
 
Physics news on Phys.org
In[1]:=x /. NSolve[(x - 1)(x^2 + 3)(x^4 + 5) == 0, x]
Out[1]={-1.05737 - 1.05737*I, -1.05737 + 1.05737*I, -3.81167*^-27 - 1.73205*I,
-3.81167*^-27 + 1.73205*I, 1., 1.05737 - 1.05737*I, 1.05737 + 1.05737*I}

In[2]:=Cases[x /. NSolve[(x - 1)(x^2 + 3)(x^4 + 5) == 0, x], _Real]
Out[2]={1.}

http://search.wolfram.com/?query=bifurcation&x=5&y=4
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
12K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K