Re: Errors at discontinuities
- To: mathgroup at smc.vnet.net
- Subject: [mg65206] Re: Errors at discontinuities
- From: "Narasimham" <mathma18 at hotmail.com>
- Date: Sat, 18 Mar 2006 06:40:29 -0500 (EST)
- References: <dvas2r$c27$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
My friend and I realized this soon after posting it (with c,d values supplied). My practice it is to test evaluate and make any corrections using plot itself as the guiding tool :) and it works well with continuous functions, so thought it was a valid enough replacement. Thanks again. David Park wrote: > I think it is usually better practice to disentangle plotting from > derivation. Prepare the function you are going to plot outside of the > plotting statement. Then you can examine it, see if it is the form you want, > do test evaluations and more easily correct things if necessary. > > a= 4 ; b = 3 ; tmax=10; > fn[u_,lam_,A_]=A*ArcSin[Sin[ 2 Pi u/lam]]*2/Pi ; > > df[t_, a_, b_, c_, d_] = D[fn[t, a, b], t]/D[fn[t, c, d], t] > > Plot[df[t, 3, 4, 5, 5.65], {t, 0, tmax}]; > > Also, in your plots c and d are never defined. I'm not certain if that > completely answers your question, but at least we obtain a plot. > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > From: Narasimham [mailto:mathma18 at hotmail.com] To: mathgroup at smc.vnet.net > > Errors appear at start / period cross-over points of a triangular wave > on t-axis with period a, amplitude b. Why does not > Plot[ D[fn[t,3,4],t] / D[fn[t,5,5.65],t] , {t, 0,tmax}] ; Or > Plot[ D[fn[t,3,4],t] , {t, 0,tmax}] ; > work at beginning when the same works erroneously later on in sl1 and > gets self-corrected at sl2? And how to remedy the situation? TIA > > a= 4 ; b = 3 ; tmax=10; > fn[u_,lam_,A_]=A*ArcSin[Sin[ 2 Pi u/lam]]*2/Pi ; > Plot[ fn[t,a,b], {t, 0,tmax}] ; > Plot[ D[fn[t,a,b],t] / D[fn[t,c,d],t] , {t, 0,tmax}] ; > sl1=D[fn[t,a,b],t]/D[fn[t,c,d] ] ; Plot[ sl1 , {t, 0, tmax}] ; > sl2= D[fn[t,a,b],t]/D[fn[t,c,d],t] ; Plot [sl2, {t, 0, tmax}] ;