Message Boards Message Boards

0
|
6900 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Getting an integration result that appears to be incorrect

Posted 9 years ago

I'm trying to use Wolfram Alpha to symbolically evaluate an integral, and I'm getting this:

integral A e^(-j sqrt(x^2+y^2)) cos(tan^(-1)(x, y)) dx = -(A e^(-j sqrt(x^2+y^2)))/j+constant

Since the purpose of the cos(tan^(-1)(x, y)) is to convert an otherwise directionless distance interaction into an x-vector, the result when integrated should still be sensitive to the sign of x. However, the result of the integration has rendered the sign of x meaningless.

Unfortunately I don't have a membership, so I can't see a breakdown of why exactly Wolfram Alpha thinks that this is the correct result.

Am I missing something, or have I stumbled across a bug?

POSTED BY: Josh Kirby
3 Replies
Posted 9 years ago

Okay, it looks like the symbolic integration is perfectly fine as long as y is greater than 0, but freaks out otherwise. That explains the unexpected results when I tried to perform a numerical integration on the result. I can work with this, I just have to limit the integration range to positives and then double the result.

I've been working with matlab, so I'm used to atan2(y,x). It's easy to forget that that doesn't mix well with symbolic operations.

POSTED BY: Josh Kirby
Posted 9 years ago

Bleh, that's right, odd functions (what I start with, maybe, sort of) integrate to even functions. I just need to rewrap my head around that, sorry for the waste of time.

The alternate form of cos(arctan(x,y)) was helpful to see, though.

POSTED BY: Josh Kirby

I don't see any problem with the result.

In[4]:= Cos[ArcTan[x, y]]

(* Out[4]= x/Sqrt[x^2 + y^2]*)

So the result looks to be correct (do it by substitution t=x^2 + y^2, dt=2*x, so it reduces to Integrate[Exp[-j*Sqrt[t]]/Sqrt[t], t] up to multiplicative constants.

Maybe you had in mind to use Cos[ArcTan[y/x]]?

POSTED BY: Daniel Lichtblau
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