Plotting equation in mathematica? Any Ideas?

Click For Summary
SUMMARY

The discussion focuses on graphing the equation (x + (1/√(1 + cos(x)²))) using Mathematica. The initial attempt using the command Plot[x + (1/(sqrt (1 + cos (x)^2))), {x, 0, 9}] failed to produce a graph due to syntax issues. The correct command is Plot[x + 1/Sqrt[1 + Cos[x^2]], {x, 0, 9}, PlotRange -> {-10, 10}], which successfully generates the desired output. The error message Plot::exclul indicates that the argument for Cos was not properly defined in the original script.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of mathematical functions and their graphical representations
  • Knowledge of error messages and debugging in Mathematica
  • Basic understanding of trigonometric functions, specifically cosine
NEXT STEPS
  • Explore advanced plotting techniques in Mathematica
  • Learn about error handling and debugging in Mathematica
  • Investigate the use of PlotRange options in Mathematica
  • Study the differences between real-valued and complex-valued functions in Mathematica
USEFUL FOR

Mathematica users, mathematicians, educators, and students looking to graph complex equations and troubleshoot plotting errors effectively.

abe_cooldude
Messages
14
Reaction score
0
Hi, I am trying to graph

(x+(1/√(1+cos(x)²)))

in mathematica, and i used

Plot[x + (1/(sqrt (1 + cos (x)^2))), {x, 0, 9}]

but I am not getting an output graph.

Any ideas?!

Plot[x + 1/Sqrt[1 + Cos x^2], {x, 0, 9}, PlotRange -> {-10, 10}]

I found few errors, and above is what I got, it's a progress, but now I get this error:

Plot::exclul: {Im[Cos x^2]-0} must be a list of equalities or \
real-valued functions.
 
Last edited:
Physics news on Phys.org
Try pressing F1. There are a ton of examples in the help file.
 
abe_cooldude said:
Hi, I am trying to graph

(x+(1/√(1+cos(x)²)))

in mathematica, and i used

Plot[x + (1/(sqrt (1 + cos (x)^2))), {x, 0, 9}]

but I am not getting an output graph.

Any ideas?!

Plot[x + 1/Sqrt[1 + Cos x^2], {x, 0, 9}, PlotRange -> {-10, 10}]

I found few errors, and above is what I got, it's a progress, but now I get this error:

Plot::exclul: {Im[Cos x^2]-0} must be a list of equalities or \
real-valued functions.

Functions and their arguments must be clearly delineated in Mathematica. It is not clear what the argument of Cos is in the above script. The following generates the graph:
Code:
Plot[x + 1/Sqrt[1 + Cos[x^2]], {x, 0, 9}, PlotRange -> {-10, 10}]
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K