MathGroup Archive 2000

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

Search the Archive

Re: step fn of sin

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21605] Re: [mg21591] step fn of sin
  • From: BobHanlon at aol.com
  • Date: Sun, 16 Jan 2000 22:43:51 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Clear[x, y, F, theta];

theta[x_] := If [ x < 0 , 0 , 1];

F[y_] := Integrate [ theta[ Sin[x] ], { x , 0 , y } ];

Plot[F[y] , { y , -4 Pi , 4 Pi }];

Take y = -5

Plot[Sin[x], {x, 0, -5}];

Plot[theta[Sin[x]], {x, 0, -5}];

 Integrate [ theta[ Sin[x] ], { x , 0 , -5 } ]

0

Clearly the above integral is wrong.

 Integrate [ theta[ Sin[x] ], { x , -Pi , -5 } ]

-5 + Pi

 Integrate [ theta[ Sin[x] ], { x , 0 , -Pi } ]

0

Assume that the problem arises in trying to work with the given definition of 
theta. Redefine theta as

Clear[theta];

theta[x_ /; x == 0] := 1;

theta[x_] := (Sign[x] + 1)/2;

Then

Plot[F[y] , { y , -4 Pi , 4 Pi }];


Bob Hanlon

In a message dated 1/16/2000 5:24:21 AM, naum at cava.physics.ucsb.edu writes:

>    I was working with integrals of theta functions of other functions
>and
>found something didn't do what I wanted it to.  I would love any help
>explaining my output.  Here is basically what I am doing.  First I define
>my
>step fn.  Then I try to integrate it of a sin fn.  like this.
>
>    theta[x_]= If [ x<0 , 0 , 1 ]
>
>    F[y_]=Integrate [ theta[ Sin[x] ],{ x , 0 , y } ]
>
>    Plot[ F[y] , { x , -4 pi , 4 pi }
>
>This gives what you would expect for x>0 , it gets bigger in sections with
>const. slope alternating by flat sections with the average height about
>x/2.
>
>try it and see the x<0 , it doesn't make any sense to be.  I think this
>should be an anti-symmetric function but it isn't.  Thanks for any help.
>


  • Prev by Date: Flat, OneIdentity attributes
  • Next by Date: Re: step fn of sin
  • Previous by thread: Re: Flat, OneIdentity attributes
  • Next by thread: Re: step fn of sin