Re: Dumb question
- To: mathgroup at smc.vnet.net
- Subject: [mg27780] Re: Dumb question
- From: Erk Jensen <Erk.Jensen at cern.ch>
- Date: Fri, 16 Mar 2001 04:37:35 -0500 (EST)
- Organization: CERN http://www.cern.ch
- References: <98neji$8g@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Gustavo Seabra wrote:
>
> Hello. I know this may be a dumb question, and I apologize for doing that.
> But I am new to Mathematica, and I'm having a little trouble with this. I
> want to plot the equation:
>
> P=[sin(a-x)*t/(a-x)]^2
>
> with fixed t (say, 1) and fixed a (say, Pi/2), with x varying from 0 to Pi.
> I know there is a discontinuity at x=a. Is there a way to plot this? I mean,
> P(x) versus x?
>
> Thanks,
> --
> -----------------------------------------------------------------
> Gustavo Seabra - Graduate Student
> Chemistry Department
> Kansas State University
> -----------------------------------------------------------------
1) I see you're new since you're using the wrong type of brackets for
Mathematica. Probably you mean (Sin[(a-x) t]/(a-x))^2 There is no problem to
plot this, since in Plot[f,{variable,min,max}] you can specify which is the
variable for the plot, which are the parameters - in your case you may want to
try
p=(Sin[(a-x) t]/(a-x))^2
Plot[p/.{a->Pi/2,t->1},{x,0,Pi}]
2) You will not see any discontinuity since there is none. There is only a hole,
but the lim from both sides will be the same, so you can fill the hole, e.g.
defining (attn., this is not exactly your expression!)
si[x_ /; x == 0] := 1
si[x_ /; x != 0] := Sin[x]/x
It's exactly like the function x/x which has a hole at x=0 ... - so what!
Ciao
-erk-