MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Plots come out blank except for certain limits

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123616] Plots come out blank except for certain limits
  • From: John Colvin <john.loughran.colvin at gmail.com>
  • Date: Tue, 13 Dec 2011 05:41:37 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi, I'm an absolute beginner with Mathematica so I may well have
missed something very simple.
I'm trying to visualise a simple minimisation problem in 2 parameters

This is the code i run:
f[a, b] = Integrate[(Sin[5*x] + Sin[3*x] - Sin[a*x] - Sin[b*x])^2, {x,
0, 10}]
this takes quite a while and returns a VERY long result

then I attempt to plot:
Plot3D[f[a, b], {a, 0, 10}, {b, 0, 10}]

the resulting plot is a 3D sinusoidal of sorts, from f = -1..1. Unless
I'm very much mistaken, the integral of the square of a real-valued
function should always be positive, so something seems amiss here
already.

Also, if I change the a and b ranges:
Plot3D[f[a, b], {a, 0, 12}, {b, 0, 12}]
for example, I get a blank plot

I realise I may just be missing something simple, but any help would
be much appreciated.

Thanks,
John



  • Prev by Date: Re: NMinimize problem: fct minimized uses FindRoot
  • Next by Date: Re: ListLinePlot starting at x=0 rather than x=1
  • Previous by thread: Re: Compile Problem with Nested Sum
  • Next by thread: R: Plots come out blank except for certain limits