Amplitude[x_] :=
1/2^0.5 (FresnelC[x + 0.645] - FresnelC[x - 0.645] +
i (FresnelS[x + 0.645] - FresnelS[x - 0.645]))
y[x_] := (Abs[Amplitude])^2
Plot[y, {x, -10, 10}]
This is my input. Please can you find any mistakes in this
Amplitude[x_] :=
1/2^0.5 (FresnelC[x + 0.645] - FresnelC[x - 0.645] +
i (FresnelS[x + 0.645] - FresnelS[x - 0.645]))
y[x_] := (Abs[Amplitude])^2
Plot[y, {x, -10, 10}]
This is my input. Please can you find any mistakes in this
Hi Cameron,
just write for the imaginary unit I instead of i. Names of build in functions and constants always begin with a capital letter. For the same reason you should name own functions e.g. amplitude[] instead of Amplitude[].
Regards – Henrik
I’ve managed to get it to work now, thank you