Re: Triangle function
- To: mathgroup at smc.vnet.net
- Subject: [mg14424] Re: Triangle function
- From: John Doty <jpd at w-d.org>
- Date: Wed, 21 Oct 1998 03:32:21 -0400
- Organization: Wampler-Doty Family
- References: <70dctu$22k@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Andrew Strobel wrote: > > Hello, > > Has Mathematica got a triangle function where I can choose the frequency > and the amplitude? > > The function is necessary to describe a voltage source. It must be an > analytical function. > > like this: > > /\ /\ > -/--\--/--\---->t > / \/ \ Your function isn't analytic at the turning points: it has no second derivatives. The simplest expression is probably: 2/Pi*ArcSin[Sin[t]] However, this is not very tractable. More conventional, and more tractable, is the Fourier series: 8*Sum[Cos[n*t]/n^2, {n, 1, Infinity, 2}])/Pi^2 replace Infinity with a suitably large odd integer, depending on the bandwidth of your voltage source. You can also transform the infinite series into a rather inscrutable "closed form" by evaluating the following (try it): <<Calculus`FourierTransform` InverseFourierTransform[ FourierTransform[Sum[8/Pi^2 Cos[n t]/n^2, {n,1,Infinity,2}],t,w],w,t] This may be good for some purposes. To adjust frequency and amplitude, multiply "t" by the angular frequency, and the whole expression by the peak amplitude. -- John Doty "You can't confuse me, that's my job." Home: jpd at w-d.org Work: jpd at space.mit.edu