Mathematica Graphing equation in Mathematica help

Click For Summary
The user is attempting to graph the function (x + (1/√(1 + cos(x)²))) in Mathematica but initially encounters issues with output. After some troubleshooting, they modify their code to Plot[x + 1/Sqrt[1 + Cos[x]^2], {x, 0, 9}, PlotRange -> {-10, 10}]. However, they receive an error message indicating that the input must be a list of equalities or real-valued functions. The discussion highlights the importance of using square brackets for function arguments in Mathematica, which is a common source of syntax errors in the software.
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
Plot[x + 1/Sqrt[1 + Cos[x]^2 ], {x, 0, 9}]

Function arguments always use square brackets as in f[x]
 

Similar threads

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