Problem with integral
12-14-2019, 07:28 AM (This post was last modified: 12-14-2019 07:34 AM by Stevetuc.)
Post: #1
 Stevetuc Member Posts: 179 Joined: Jan 2014
Problem with integral
In this form
Code:
int(e^(-t-i*t),t,(-τ)/2,τ/2)
The result with maximum simplification is:
Code:
((-1+i)*e^((-1-i)*τ/2)+(1-i)*e^((1+i)*τ/2))/2

But if I present the same integral in an expanded form with the real and complex exponents seperated:
Code:
int(e^(-t)*e^((-(i))*t),t,(-τ)/2,τ/2)
I get this result:
Code:
((e^(1/2*τ))^2*(e^(i/2*τ))^2*tan(τ/4)^2+(e^(1/2*τ))^2*(e^(i/2*τ))^2+(-1-i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)+(1+i)*(e^(1/2*τ))^2*e^(i/2*τ)+(−i)*(e^(1/2*τ))^2*tan(τ/4)^2+(−i)*(e^(1/2*τ))^2+i*(e^(i/2*τ))^2*tan(τ/4)^2+i*(e^(i/2*τ))^2+(1+i)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(i/2*τ)*tan(τ/4)+(-1-i)*e^(i/2*τ)-tan(τ/4)^2-1)/((2+2*i)*e^(1/2*τ)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(1/2*τ)*e^(i/2*τ))
It seems like the simplification should be doing a better job with this simple input.

I want to keep the exponents separate because eventually I want to input:
Code:
int(f(t)*e^(-i*t),t,(-τ)/2,τ/2)
Where f(t) is some arbitrary function of t. Obviously f(t) could then be e^(-t) and id prefer it returned the first of the above results!
12-14-2019, 07:53 AM
Post: #2
 Carsen Member Posts: 190 Joined: Jan 2017
RE: Problem with integral
I think the simplify command did a fine job. Since their was trig used in the answer of integral of e^(-t)*e^((-(i))*t), it probably attempted to keep the trig in the solution.

If the command trig2exp is used before simplify, it returns the answer in the same form as the first integral, which is...
Code:
 ((-1+i)*e^((-1-i)*τ/2)+(1-i)*e^((1+i)*τ/2))/2
12-14-2019, 08:55 AM (This post was last modified: 12-14-2019 09:03 AM by Stevetuc.)
Post: #3
 Stevetuc Member Posts: 179 Joined: Jan 2014
RE: Problem with integral
(12-14-2019 07:53 AM)Carsen Wrote:  I think the simplify command did a fine job. Since their was trig used in the answer of integral of e^(-t)*e^((-(i))*t), it probably attempted to keep the trig in the solution.

If the command trig2exp is used before simplify, it returns the answer in the same form as the first integral, which is...
Code:
 ((-1+i)*e^((-1-i)*τ/2)+(1-i)*e^((1+i)*τ/2))/2

I disagree. Even if the solution mixes trig and exponent forms, its the case that both the problem and the solution can be expressed in exponent or trig form. I think its reasonable to expect the Maximum Simplification option to handle this, rather than the user having to manually enter simplify(trig2exp...

Wolfram provides identical results for both forms

12-15-2019, 07:07 AM
Post: #4
 parisse Senior Member Posts: 1,087 Joined: Dec 2013
RE: Problem with integral
Try lin(trig2exp(...)). There is unfortunately no way to make simplify guess what you really want to do.
12-15-2019, 02:37 PM
Post: #5
 Stevetuc Member Posts: 179 Joined: Jan 2014
RE: Problem with integral
(12-15-2019 07:07 AM)parisse Wrote:  Try lin(trig2exp(...)). There is unfortunately no way to make simplify guess what you really want to do.

Thank you I will try that. I guess my thinking was if problem is expressed purely as 2 exponents and the result can be expressed as 2 exponents, the intent is fairly clear.
Luckily I can check the simplified result on Wolfram.
12-15-2019, 10:19 PM
Post: #6
 rprosperi Senior Member Posts: 3,905 Joined: Dec 2013
RE: Problem with integral
(12-15-2019 02:37 PM)Stevetuc Wrote:  Luckily I can check the simplified result on Wolfram.

If you have access to Wolfram, and you trust it more than the Prime, why use the Prime at all? Just curious...

--Bob Prosperi
12-16-2019, 04:41 AM
Post: #7
 Stevetuc Member Posts: 179 Joined: Jan 2014
RE: Problem with integral
(12-15-2019 10:19 PM)rprosperi Wrote:
(12-15-2019 02:37 PM)Stevetuc Wrote:  Luckily I can check the simplified result on Wolfram.

If you have access to Wolfram, and you trust it more than the Prime, why use the Prime at all? Just curious...

The purpose of reporting issues with a product to r&d is to improve the product. Checking a result against other sources is normal engineering practice.
Your question seems to imply you would be happy with this result:
((e^(1/2*τ))^2*(e^(i/2*τ))^2*tan(τ/4)^2+(e^(1/2*τ))^2*(e^(i/2*τ))^2+(-1-i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)+(1+i)*(e^(1/2*τ))^2*e^(i/2*τ)+(−i)*(e^(1/2*τ))^2*tan(τ/4)^2+(−i)*(e^(1/2*τ))^2+i*(e^(i/2*τ))^2*tan(τ/4)^2+i*(e^(i/2*τ))^2+(1+i)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(i/2*τ)*tan(τ/4)+(-1-i)*e^(i/2*τ)-tan(τ/4)^2-1)/((2+2*i)*e^(1/2*τ)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(1/2*τ)*e^(i/2*τ))
Do you prefer the challenge of finding commands that unlock the hidden answer..just curious?
12-16-2019, 02:12 PM
Post: #8
 rprosperi Senior Member Posts: 3,905 Joined: Dec 2013
RE: Problem with integral
(12-16-2019 04:41 AM)Stevetuc Wrote:
(12-15-2019 10:19 PM)rprosperi Wrote:  If you have access to Wolfram, and you trust it more than the Prime, why use the Prime at all? Just curious...

The purpose of reporting issues with a product to r&d is to improve the product. Checking a result against other sources is normal engineering practice.
Your question seems to imply you would be happy with this result:
((e^(1/2*τ))^2*(e^(i/2*τ))^2*tan(τ/4)^2+(e^(1/2*τ))^2*(e^(i/2*τ))^2+(-1-i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)+(1+i)*(e^(1/2*τ))^2*e^(i/2*τ)+(−i)*(e^(1/2*τ))^2*tan(τ/4)^2+(−i)*(e^(1/2*τ))^2+i*(e^(i/2*τ))^2*tan(τ/4)^2+i*(e^(i/2*τ))^2+(1+i)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(i/2*τ)*tan(τ/4)+(-1-i)*e^(i/2*τ)-tan(τ/4)^2-1)/((2+2*i)*e^(1/2*τ)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(1/2*τ)*e^(i/2*τ))
Do you prefer the challenge of finding commands that unlock the hidden answer..just curious?

Thanks for replying; there was no insult intended, it seems you took my question as offensive. Using Prime and checking results with other resources in order to provide feedback that can improve the product is a perfectly fine, in fact admirable, reason. But uncommon, hence my curiosity.

And there are no conditions imaginable in which that result could make me happy, correct or not. And, correct or not, any product that provided such an answer surely needs improving. It's a good thing folks like you are helping to prevent folks like me from ever receiving such a result.

--Bob Prosperi
12-16-2019, 02:30 PM (This post was last modified: 12-16-2019 03:12 PM by Stevetuc.)
Post: #9
 Stevetuc Member Posts: 179 Joined: Jan 2014
RE: Problem with integral
(12-16-2019 02:12 PM)rprosperi Wrote:
(12-16-2019 04:41 AM)Stevetuc Wrote:  The purpose of reporting issues with a product to r&d is to improve the product. Checking a result against other sources is normal engineering practice.
Your question seems to imply you would be happy with this result:
((e^(1/2*τ))^2*(e^(i/2*τ))^2*tan(τ/4)^2+(e^(1/2*τ))^2*(e^(i/2*τ))^2+(-1-i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)+(1+i)*(e^(1/2*τ))^2*e^(i/2*τ)+(−i)*(e^(1/2*τ))^2*tan(τ/4)^2+(−i)*(e^(1/2*τ))^2+i*(e^(i/2*τ))^2*tan(τ/4)^2+i*(e^(i/2*τ))^2+(1+i)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(i/2*τ)*tan(τ/4)+(-1-i)*e^(i/2*τ)-tan(τ/4)^2-1)/((2+2*i)*e^(1/2*τ)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(1/2*τ)*e^(i/2*τ))
Do you prefer the challenge of finding commands that unlock the hidden answer..just curious?

Thanks for replying; there was no insult intended, it seems you took my question as offensive. Using Prime and checking results with other resources in order to provide feedback that can improve the product is a perfectly fine, in fact admirable, reason. But uncommon, hence my curiosity.

And there are no conditions imaginable in which that result could make me happy, correct or not. And, correct or not, any product that provided such an answer surely needs improving. It's a good thing folks like you are helping to prevent folks like me from ever receiving such a result.

Not at all, I took no offence and tried to provide an accurate answer. Using prime to provide feedback was not my primary purpose, in fact I was trying to write a function to handle certain integrals, and faced with that result, provided the feedback.
Im glad to hear someone else finds the convoluted result prime output to be unacceptable, since all the previous responses either described it as a fine job (I take that at face value..) or not possible to improve.
I hope that with further feedback from interested users, the design team will be motivated to improve the product so we dont have to face such a result. Till then, Ill continue to use Wolfram to check results on the prime!
12-16-2019, 06:22 PM
Post: #10
 CyberAngel Member Posts: 259 Joined: Jul 2018
RE: Problem with integral
(12-16-2019 04:41 AM)Stevetuc Wrote:
(12-15-2019 10:19 PM)rprosperi Wrote:  If you have access to Wolfram, and you trust it more than the Prime, why use the Prime at all? Just curious...

The purpose of reporting issues with a product to r&d is to improve the product. Checking a result against other sources is normal engineering practice.
Your question seems to imply you would be happy with this result:
((e^(1/2*τ))^2*(e^(i/2*τ))^2*tan(τ/4)^2+(e^(1/2*τ))^2*(e^(i/2*τ))^2+(-1-i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)+(1+i)*(e^(1/2*τ))^2*e^(i/2*τ)+(−i)*(e^(1/2*τ))^2*tan(τ/4)^2+(−i)*(e^(1/2*τ))^2+i*(e^(i/2*τ))^2*tan(τ/4)^2+i*(e^(i/2*τ))^2+(1+i)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(i/2*τ)*tan(τ/4)+(-1-i)*e^(i/2*τ)-tan(τ/4)^2-1)/((2+2*i)*e^(1/2*τ)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(1/2*τ)*e^(i/2*τ))
Do you prefer the challenge of finding commands that unlock the hidden answer..just curious?

Did you try
lin(trig2exp(...))
?
12-16-2019, 06:59 PM (This post was last modified: 12-16-2019 07:07 PM by Stevetuc.)
Post: #11
 Stevetuc Member Posts: 179 Joined: Jan 2014
RE: Problem with integral
(12-16-2019 06:22 PM)CyberAngel Wrote:
(12-16-2019 04:41 AM)Stevetuc Wrote:  The purpose of reporting issues with a product to r&d is to improve the product. Checking a result against other sources is normal engineering practice.
Your question seems to imply you would be happy with this result:
((e^(1/2*τ))^2*(e^(i/2*τ))^2*tan(τ/4)^2+(e^(1/2*τ))^2*(e^(i/2*τ))^2+(-1-i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*(e^(1/2*τ))^2*e^(i/2*τ)*tan(τ/4)+(1+i)*(e^(1/2*τ))^2*e^(i/2*τ)+(−i)*(e^(1/2*τ))^2*tan(τ/4)^2+(−i)*(e^(1/2*τ))^2+i*(e^(i/2*τ))^2*tan(τ/4)^2+i*(e^(i/2*τ))^2+(1+i)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(i/2*τ)*tan(τ/4)+(-1-i)*e^(i/2*τ)-tan(τ/4)^2-1)/((2+2*i)*e^(1/2*τ)*e^(i/2*τ)*tan(τ/4)^2+(2+2*i)*e^(1/2*τ)*e^(i/2*τ))
Do you prefer the challenge of finding commands that unlock the hidden answer..just curious?

Did you try
lin(trig2exp(...))
?