Message Boards Message Boards

0
|
8227 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Integrate a piecewise function?

Posted 6 years ago

I am trying to integrate a step function given in a book, but it doesn't work.

Phi[x_]:= Piecewise[{{-Hg x, -g/2 <= x <= g/2}, {-g Hg/2, x >= g/2}, {g Hg/2, x < -g/2}}]

I can plot it and give the same result as in book but the integration is not the same so my integration code is:

Integrate[y1/ \[Pi] \[CapitalPhi][x]/((x1-x)^2+y1^2), {x, -Infinity, Infinity}, Assumptions -> x1 > 0 && y1 > 0](*here y1=y in book*)

In book it only says for y>0, so I assume x>0 also because for just y>0 mathematica doesn't integrate. Thanks for your help

my code and book page is attached

enter image description here

Attachments:
POSTED BY: Arm Mo
2 Replies

I got (almost) the result in your book -and I think it is actually the same (multiply the leading 1/2 into the expression and have a close look at the arguments of the functions.

Look at the notebook before evaluating it, and note how t1 + t2 + t3 is modified if you apply FullSimplify to it.

Attachments:
POSTED BY: Hans Dolhaine
Posted 6 years ago

Amazing!!! I see how you define piece by piece and integrated over defined region. Thanks a lot sir.

POSTED BY: Arm Mo
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract