Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Triangle function

  • To: mathgroup at
  • Subject: [mg14424] Re: Triangle function
  • From: John Doty <jpd at>
  • Date: Wed, 21 Oct 1998 03:32:21 -0400
  • Organization: Wampler-Doty Family
  • References: <70dctu$>
  • Sender: owner-wri-mathgroup at

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

The simplest expression is probably:


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):

  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
Work: jpd at

  • Prev by Date: Re: FactorInteger
  • Next by Date: Re: FactorInteger
  • Previous by thread: Re: Triangle function
  • Next by thread: Re: Triangle function