1

I defined f(x)=sin(2x) and g(x)=2*sin(x). Then I try to plot f(x) and g(x) on the same axis, but the plot is blank. What am I doing wrong? Here is my argument so far:

plot[{f(x),g(x)},{x,-1,1}]

1 Answers1

2

I am OK with Chuy but the best thing is to look at code

f[x_] := Sin[2 x]
g[x_] := 2*Sin[x]
Plot[{f[x], g[x]}, {x, -1, 1}]

every command in mathematica begins with an uppercase. Forget ( for the functions. It must be defined with brackets or you must ask it to change its behavior.

Take a good how to on internet before going further.

Cordially

Karsten7
  • 27,448
  • 5
  • 73
  • 134
cyrille.piatecki
  • 4,582
  • 13
  • 26