Re: Fourier Transform with Differential Equation

• To: mathgroup at smc.vnet.net
• Subject: [mg48985] Re: [mg48968] Fourier Transform with Differential Equation
• From: Sseziwa Mukasa <mukasa at jeol.com>
• Date: Fri, 25 Jun 2004 17:52:32 -0400 (EDT)
• References: <200406250658.CAA12495@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```On Jun 25, 2004, at 2:58 AM, Lee Fisher wrote:

> I'm attempting to find the frequency response of the output of an RC
> circuit (a low-pass filter).  For some reason, the output of the
> Fourier
> transform in mathematica does not seem to correspond to anything I
> would
> expect from this differential equation.  It seems that the placement of
> the initial conditions has an enormous effect on the shape of the
> frequency response, so much so that the phase portion looks nothing
> like
> i would expect it to. I'm using the following code
>
> w=1
> result=DSolve[{10 V'[t]+V[t]==E^(I w t), V[0]==0},V,t}]
> time=Table[i,{i,0,100}];
> out=Re[Evaluate[V[time]/.result[[1]]]];
> fout=Fourier[out];
> ListPlot[Abs[fout],PlotJoined->True,PlotRange->All]
> ListPlot[Arg[fout],PlotJoined->True,PlotRange->All]
>
> and adjusting w to observe the response at different frequencies. While
> the magnitude graph is somewhat reminiscent of what I would expect, the
> phase graph looks nothing like I'd expect (it should be at Pi highly
> negative frequencies, negative Pi at highly positive frequencies, and
> at
> 0 at the zero frequency).  Could someone please explain to me either
> where my code is wrong, or where my expectation of the magnitude and
> phase output is wrong.
>

The output of Fourier places the 0 frequency at the beginning of the
resulting data set, thus the negative frequencies are in the last half
of the plot due to the periodic nature of the Discrete Fourier
Transform.  The following plots

ListPlot[RotateRight[Abs[fout], Quotient[
Length[fout], 2]], PlotJoined -> True, PlotRange -> All]
ListPlot[RotateRight[Arg[fout], Quotient[Length[
fout], 2]], PlotJoined -> True, PlotRange -> All]

are what you expect.

Regards,

Ssezi

```

• Prev by Date: Re: Overlay graphs
• Next by Date: RE: Simplifying with assumptions
• Previous by thread: Fourier Transform with Differential Equation
• Next by thread: Re: Fourier Transform with Differential Equation