To visualize the solution you mus create a file containing on each line the values of x and y of the function y(x) you want to plot. Then if the file containing these data is called "ex.gnu", at the unix level you can type
gnuplot plot "f.gnu" w l quit
and it will display a window with a graph of the function.