Ti-nSpire giving the wrong answer for integral? Which one is right?

  • Thread starter Jeff12341234
  • Start date
  • Tags
    Integral
In summary: The "+c" issue is relevant because it is what allows wolfram alpha to simplify the integral. Without "+c", wolfram alpha would not be able to do that.Wolfram alpha never even made a mistake. The OP never asked wolfram alpha to evaluate an integral, he asked wolfram alpha to simplify an...integral. The "+c" issue is relevant because it is what allows wolfram alpha to simplify the integral.
  • #1
Jeff12341234
179
0
I'm getting different answers for this integral

GesMlaO.jpg


y1I4PoN.png


tkumM93.png
 
Physics news on Phys.org
  • #2


Are you able to check which one is right by hand?
 
  • #3


I don't trust it by hand.

It looks like this one is right:

y1I4PoN.png
 
  • #4


I have a hard time finding why you expect both TI and WA input to be equivalent.
 
  • #5


There should only be one correct answer and several ways to write it. In this case, the answers are different, not just written differently. One is right, and the others are wrong. I'm trying to verify which one is truly correct.
 
  • #6


Jeff12341234 said:
There should only be one correct answer and several ways to write it. In this case, the answers are different, not just written differently. One is right, and the others are wrong. I'm trying to verify which one is truly correct.

You can get more than one correct answer for an indefinite integral, if you didn't know that.
 
  • #7


Can you show me a simple example? because what you're calling a different answer, I'm thinking is just an *equivalent* answer. In other words, the same answer, but written differently which is not what's going on here.
 
  • #8


Jeff12341234 said:
There should only be one correct answer and several ways to write it. In this case, the answers are different, not just written differently. One is right, and the others are wrong. I'm trying to verify which one is truly correct.

No, you are wrong about that. You have an indefinite integration, so a problem of the form
[tex] e^{\int(f(x) \, dx}[/tex] will have an answer of the form
[tex] e^{C + F(x)} = k\, e^{F(x)},[/tex] where ##F(x)## is an anti-derivative of ##f(x),## ##C## is an arbitrary constant and ##k = e^C.##
 
  • #9


Suppose we calculate:
$$e^{\int dt} = e^{t +C} = e^C e^t \qquad (1)$$

Both ##e^t## and ##2 e^t## are correct answers for (1).
You'll get the first if we pick C=0, and the second if we pick C=ln 2.

You might also say that the correct answer for (1) is:
$$e^{\int dt} = De^t$$
where D is an arbitrary integration constant.

It appears that your Ti-nSpire is not equipped to show integration constants.
 
Last edited:
  • #10


Borek said:
I have a hard time finding why you expect both TI and WA input to be equivalent.

I don't see it either. The correct wolfram alpha entry should be: https://www.physicsforums.com/showthread.php?t=673855 and this coincides with the other answers. Well, except for the absolute value signs which really should be there.
 
  • #11


I like Serena said:
Suppose we calculate:
$$e^{\int dt} = e^{t +C} = e^C e^t \qquad (1)$$

Both ##e^t## and ##2 e^t## are correct answers for (1).
You'll get the first if we pick C=0, and the second if we pick C=ln 2.

You might also say that the correct answer for (1) is:
$$e^{\int dt} = De^t$$
where D is an arbitrary integration constant.

It appears that your Ti-nSpire is not equipped to show integration constants.
bringing up the "+c" that gets added to any integration solution doesn't address the original question. It's unrelated. It doesn't in any way address the question of which of the 3 answers is right since the differences in the answers clearly don't have anything to do with the arbitrary constant.

To conclude, it appears that the image below is the correct answer + c. I don't know what wolfram alpha is doing..

y1I4PoN.png
 
Last edited by a moderator:
  • #12


Jeff12341234 said:
bringing up the "+c" that gets added to any integration solution doesn't address the original question. It's unrelated. It doesn't in any way address the question of which of the 3 answers is right since the differences in the answers clearly don't have anything to do with the arbitrary constant.

To conclude, it appears that the image below is the correct answer + c. I don't know wtf wolfram alpha is doing..

y1I4PoN.png

No, thee "+c" issue is not unrelated---it is the crux of most of your problem. The fact is that Wolfram Alpha should have written |x-50| or |50-x| instead of 50-x, but that is the only thing "wrong" about its answer, and even that is not wrong if x < 50. Exactly WHY do you think the +C issue is irrelevant? Just saying it does not make it true; you need to *demonstrate* it.
 
  • #13


The + c does need to be there. I'm not arguing that. However, it doesn't play any part in answering the question of which of the 3 answers is correct. It's just a, "by-the-way, you need to have + c in there" technicality. It's irrelevant to my original, specific, specific question.
 
  • #14


Ray Vickson said:
No, thee "+c" issue is not unrelated---it is the crux of most of your problem. The fact is that Wolfram Alpha should have written |x-50| or |50-x| instead of 50-x, but that is the only thing "wrong" about its answer, and even that is not wrong if x < 50. Exactly WHY do you think the +C issue is irrelevant? Just saying it does not make it true; you need to *demonstrate* it.

Wolfram alpha never even made a mistake. The OP never asked wolfram alpha to evaluate an integral, he asked wolfram alpha to simplify an expression. Wolfram alpha did that correctly since the OP wrote the expression without absolute value.
 
  • #15


I don't know about "mistake", but WA seems to be wrong. I'll do it again and post the images.
 
Last edited:
  • #16


now, +c wasn't added to the first part of this 2 step process. I just took the answer wolfram gave, set it as a power of e, and let wolfram simplify it. Even so, the answer in the first step is wrong/different from what I get from the Ti-nSpire. I get -5/2*ln(x-50)

nSFQzkM.png

tkumM93.png
 
  • #17


Hmm, I see: http://www.wolframalpha.com/input/?i=e^%28int+5%2F%28100+-+2t%29+dt+%29
 
  • #18


micromass said:
Hmm, I see: http://www.wolframalpha.com/input/?i=e^%28int+5%2F%28100+-+2t%29+dt+%29

yep, that's essentially what I got from WA earlier. It's still different from the Ti's answer. As I've been saying since the beginning, they can't both be right.

y1I4PoN.png
 
  • #19


Jeff12341234 said:
now, +c wasn't added to the first part of this 2 step process. I just took the answer wolfram gave, set it as a power of e, and let wolfram simplify it. Even so, the answer in the first step is wrong/different from what I get from the Ti-nSpire. I get -5/2*ln(x-50)

nSFQzkM.png

tkumM93.png

OK, but the two answers are equal up to a constant:

[tex]\frac{-5}{2}\log(-2(x-50)) = \frac{-5}{2}\log(2) + \frac{-5}{2}\log(50-x)[/tex]

So both answers are right. Wolfram alpha just implemented his integral calculations differently from you pocket calculator.
 
  • #20


Jeff12341234 said:
yep, that's essentially what I got from WA earlier. It's still different from the Ti's answer. As I've been saying since the beginning, they can't both be right.

The thing is that they are both right. An integral is not a unique function, it is determined up to a constant. So if

[tex]\int f(x)dx = F(x) + C[/tex]

then both F(x), F(x)+1 and F(x) + 200 are valid primitives.
 
  • #21


The two different answers have different graphs though. Am I to assume that either answer will give me the right result when using it during the process of solving a D.E.??
 
  • #22


Jeff12341234 said:
The two different answers have different graphs though.

Sure, I don't see a problem. In fact, if you take all the solutions of a DE (with some conditions), then all solutions should be disjoint and they should fill the plane. This is called the phase portrait of the DE: http://en.wikipedia.org/wiki/Phase_portrait

Am I to assume that either answer will give me the right result when using it during the process of solving a D.E.??

Yes, it will get you the right result.

In fact, a DE usually has infinitely many solutions. The easy DE [itex]y^\prime = y[/itex] has a solutions [itex]y(x) = Ce^x[/itex]. For each number C, we get a solution.
 
  • #23


Regardless what your Ti and W|A are saying (mathematically speaking they are both wrong), the proper calculation is:

$$e^{\int \frac{5}{100-2t}dt}
= \left[ \begin{matrix}
e^{-\frac 5 2 \ln(100-2t) + C_1} & \qquad\text{ if } 100-2t > 0 \\
e^{-\frac 5 2 \ln(2t - 100) + C_2} & \qquad\text{ if } 100-2t < 0
\end{matrix}\right.$$

$$e^{\int \frac{5}{100-2t}dt}
= \left[ \begin{matrix}
e^{C_1} \cdot (100-2t)^{-5/2} & \qquad\text{ if } t < 50 \\
e^{C_2} \cdot (2t - 100)^{-5/2} & \qquad\text{ if } t > 50
\end{matrix}\right.$$

$$e^{\int \frac{5}{100-2t}dt}
= \left[ \begin{matrix}
\frac{e^{C_1}}{(100-2t)^{5/2}} & \qquad\text{ if } t < 50 \\
\frac{e^{C_2}}{(2t - 100)^{5/2}} & \qquad\text{ if } t > 50
\end{matrix}\right.$$

We can simplify this with new integration constants to a final answer:

$$e^{\int \frac{5}{100-2t}dt}
= \left[ \begin{matrix}
\frac{1}{D_1 \cdot |t - 50|^{5/2}} & \qquad\text{ if } t < 50 \\
\frac{1}{D_2 \cdot |t - 50|^{5/2}} & \qquad\text{ if } t > 50
\end{matrix}\right.$$

This answer matches both your Ti and W|M with specific choices for ##D_1## and ##D_2## (which shouldn't have been made).
 
  • #24


I like Serena said:
Regardless what your Ti and W|A are saying (mathematically speaking they are both wrong), the proper calculation is:

Well, strictly speaking, WA is not wrong. When wolfram alpha calculates an integral, it just gives one solution and it doesn't give the constant of integration.

Your solutions is of course correct, but it is equal for a correct choice of contants. (I wish to stress that WA allows the constants of integration to be complex!).

The trickery part in this problem is that the original function doesn't exist in the point [itex]t=50[/itex]. This means that the constants of integration will not be unique. Like you did, you found constants [itex]D_1[/itex] and [itex]D_2[/itex].

But if you're just interested in one particular solution (like WA), then the answer of WA is perfectly valid.
 
  • #25


micromass said:
Well, strictly speaking, WA is not wrong. When wolfram alpha calculates an integral, it just gives one solution and it doesn't give the constant of integration.

Usually W|A gives the integration constant in light gray.
See for instance here.

It appears that W|A gave up on that for the more complicated expression.

Btw, doesn't the solution to an indefinite integral require the integration constant?
 
  • #26


micromass said:
Well, strictly speaking, WA is not wrong. When wolfram alpha calculates an integral, it just gives one solution and it doesn't give the constant of integration.

Your solutions is of course correct, but it is equal for a correct choice of contants. (I wish to stress that WA allows the constants of integration to be complex!).

The trickery part in this problem is that the original function doesn't exist in the point [itex]t=50[/itex]. This means that the constants of integration will not be unique. Like you did, you found constants [itex]D_1[/itex] and [itex]D_2[/itex].

But if you're just interested in one particular solution (like WA), then the answer of WA is perfectly valid.

I retract that WA is right. If I do this: http://www.wolframalpha.com/input/?i=int+1/x
then I get

[tex]\int \frac{1}{x}dx = \log(x)+C[/tex]

While it is completely correct that [itex]\log(x)[/itex] is a primitive, and it is even correct that [itex]\log(x)+C[/itex] are all primitives. But these don't form a complete set of primitives. There are more. Wolfram alpha makes it seem like these are all the solutions, and this is wrong.

Now, if they just said that it was a solution, then it would be correct.
 
  • #27


If you take away D1 and/or D2, the equation matches with what the Ti spit out. Therefore, it seems that the Ti would be the answer to go with.
 
  • #28


I like Serena said:
Btw, doesn't the solution to an indefinite integral require the integration constant?

Sure. But it is understandable that calculators don't give the entire class of solutions, but just one particular solution. If your function has many singularities, then to give the entire class of primitieves, you'll need to know all the singularities.

For example, if you want to calculate the primitive of tan(x), then even in good calc books, they say that the answer is [itex]\log(\cos(x))+C[/itex]. This is of course wrong since the function has singularities. So the answer is much more complicated and requires infinitely many integration constants. I'm not going to blame wolfram alpha for not giving the exact solution. (I DO blame the calc books for not giving the exact solution though).

So I'm perfectly fine with the fact that calculators and programs just give one solution to the problem, on the condition that they make it clear it is only one solution. But wolfram alpha adds a "+ constant", and therefore they indicate that it's the entire class. This is wrong.
 
  • #29


Jeff12341234 said:
If you take away D1 and/or D2, the equation matches with what the Ti spit out. Therefore, it seems that the Ti would be the answer to go with.

I don't think that you understand that all solutions you got were correct. They all gave you one solution for your problem.

If you want all the solutions, then you'll find it in ILS his post. But I stress that the solutions by wolfram alpha were not wrong in the sense that it gives you one solution to the problem.
 
  • #30


I find it simpler to just do it by hand. Since this is for your mixture problem, you just use:

e^(-5/2)ln|50-t| => (50-t)^(-5/2).

Using u-substitution (don't have to) makes it easier to understand:

∫[itex]\frac{5}{100-2t}[/itex]dt = [itex]\frac{5}{2}[/itex]∫[itex]\frac{1}{50-t}[/itex]dt

Let u = 50-t, then du = -1dt. Substituting back in:

-[itex]\frac{5}{2}[/itex]∫[itex]\frac{1}{u}[/itex]du = -[itex]\frac{5}{2}[/itex]ln|u| + C = -[itex]\frac{5}{2}[/itex]ln|50-t| + C. Set the constant of integration to 0 and:

e-[itex]\frac{5}{2}[/itex]ln|50-t| = (50-t)-[itex]\frac{5}{2}[/itex]

Then, solve the rest of your mixture problem in the other post and you will end up with a real result, instead of non-real.
 
Last edited:
  • #31


hogrampage said:
-[itex]\frac{5}{2}[/itex]∫[itex]\frac{1}{u}[/itex]du = -[itex]\frac{5}{2}[/itex]ln|u| + C

The entire point is that this equality is not true. Although all calculus like to think that it is. There are more functions F such that [itex]F^\prime (u)=\frac{1}{u}[/itex] than just the functions [itex]F(u)=ln|u|[/itex].

It's all good if you eventually take a specific C (like you do). But I stress that these are not all the solutions!
 
  • #32


micromass said:
The entire point is that this equality is not true. Although all calculus like to think that it is. There are more functions F such that [itex]F^\prime (u)=\frac{1}{u}[/itex] than just the functions [itex]F(u)=ln|u|[/itex].

It's all good if you eventually take a specific C (like you do). But I stress that these are not all the solutions!

I understand that, but for the problem he is trying to solve (mixture), it is valid. It is annoying that these books don't explain the things you all are.
 
  • #33


hogrampage said:
I understand that, but for the problem he is trying to solve (mixture), it is valid. It is annoying that these books don't explain the things you all are.

I know, right? No single calculus book does it the right way. Even Apostol makes the mistake of saying [itex]\int \frac{1}{u}du = ln|u| + C[/itex]. Spivak just doesn't deal with indefinite integration, so I guess that he's clean.

I know that for his problem, the method is perfectly valid. But his confusion comes from the fact that you need integration constants, and that you sometimes need more than one integration constant.
 
  • #34


micromass said:
I know, right? No single calculus book does it the right way. Even Apostol makes the mistake of saying [itex]\int \frac{1}{u}du = ln|u| + C[/itex]. Spivak just doesn't deal with indefinite integration, so I guess that he's clean.

I know that for his problem, the method is perfectly valid. But his confusion comes from the fact that you need integration constants, and that you sometimes need more than one integration constant.

I guess we need a special notation for this.
Something like:

[itex]\int \frac{1}{u}du = ln|u| + \mathfrak C[/itex]
where ##\mathfrak C## denotes an arbitrary constant that can be different in disconnected parts of the domain.

Perhaps we can still write
[itex]\int \frac{1}{u}du = ln|u| \color{gray}{+ C}[/itex]
with the implicit understanding that C represents a class of possibly different constants depending on the part of the domain.
 
  • #35


Ray Vickson said:
Jeff12341234 said:
There should only be one correct answer and several ways to write it. In this case, the answers are different, not just written differently. One is right, and the others are wrong. I'm trying to verify which one is truly correct.
No, you are wrong about that. You have an indefinite integration, so a problem of the form
[tex] e^{\int(f(x) \, dx}[/tex] will have an answer of the form
[tex] e^{C + F(x)} = k\, e^{F(x)},[/tex] where ##F(x)## is an anti-derivative of ##f(x),## ##C## is an arbitrary constant and ##k = e^C.##

Ray Vickson said:
Jeff12341234 said:
bringing up the "+c" that gets added to any integration solution doesn't address the original question. It's unrelated. It doesn't in any way address the question of which of the 3 answers is right since the differences in the answers clearly don't have anything to do with the arbitrary constant.

To conclude, it appears that the image below is the correct answer + c. I don't know what wolfram alpha is doing..

y1I4PoN.png

No, thee "+c" issue is not unrelated---it is the crux of most of your problem. The fact is that Wolfram Alpha should have written |x-50| or |50-x| instead of 50-x, but that is the only thing "wrong" about its answer, and even that is not wrong if x < 50. Exactly WHY do you think the +C issue is irrelevant? Just saying it does not make it true; you need to *demonstrate* it.

Jeff12341234 said:
The + c does need to be there. I'm not arguing that. However, it doesn't play any part in answering the question of which of the 3 answers is correct. It's just a, "by-the-way, you need to have + c in there" technicality. It's irrelevant to my original, specific, specific question.

I realize that this thread is already quite long and the subject has been quite thoroughly hashed over, ... but back in some fairly early posts, Ray Vickson (RVG), did a quite good job of pointing out that the only difference between the results from the TI n-spire CAS and the Wolfram Mathematica Online Integrator was a different choice for the constant of integration.

Looking at your (Jeff12341234) screen shots, it's apparent that the TI's result for the integration was
[itex]\displaystyle \int \frac{5}{1-2x}\,dx=\frac{-5\cdot\log(x-50)}{2}+C_1[/itex]
[itex]\displaystyle \quad\quad\quad\ =\frac{-5\cdot\log(x-50)}{2}\ \ [/itex]with C1 chosen to be zero.​
By ignoring the absolute value, this intermediate result is valid only for x > 50, but that's not the point I'm addressing in this post. (I really wanted to put the absolute values in there --- still working on my OCD --- it's really more of an affliction that a disorder!)​

Your screen shot from the W-M Integrator shows a somewhat different result.
[itex]\displaystyle \int \frac{5}{1-2x}\,dx=\frac{-5\cdot\log((-2)(x-50))}{2}[/itex]

However, [itex]\displaystyle \ \ \frac{-5\cdot\log((-2)(x-50))}{2}=\frac{-5\cdot\log(50-x))}{2}+\frac{-5\cdot\log(2)}{2}\ . [/itex]

This is equivalent to having

[itex]\displaystyle \quad \quad \quad \int \frac{5}{1-2x}\,dx=\frac{-5\cdot\log(50-x)}{2}+C_2\,, \ [/itex] where C2 is chosen to be [itex]\displaystyle \ \ \frac{-5\cdot\log(2)}{2}\ .[/itex]​


Of course, [itex]\ \ \ e^{\left(\displaystyle \frac{-5\cdot\log(2)}{2}\right)}=\displaystyle \frac{1}{4\sqrt{2\,}}\ .[/itex]

RVG had some very good advice indeed !
 

1. Why is my Ti-nSpire giving me the wrong answer for my integral?

There could be several reasons for this. One possibility is that you may have entered the wrong function or limits for your integral. Another possibility is that there may be a mistake in your calculator's settings or mode. It is also possible that the function you are trying to integrate may be too complex for the calculator to handle accurately.

2. How can I ensure that my Ti-nSpire gives me the correct answer for my integral?

To ensure accuracy, double check that you have entered the correct function and limits for your integral. Also, make sure your calculator is in the correct mode (i.e. Radian or Degree) and that your settings are appropriate for the type of integral you are trying to solve. If the function is too complex, try breaking it down into smaller parts or using a different method of integration.

3. Is there a specific way to enter integrals on the Ti-nSpire?

Yes, there is a specific syntax for entering integrals on the Ti-nSpire. The integral symbol is represented by "int(" and the function to be integrated is entered after that, followed by a comma and the variable of integration. The limits of integration are then entered in square brackets after a comma. For example, to integrate the function x^2 from 0 to 5, the input would be "int(x^2,x,0,5)".

4. Can the Ti-nSpire give wrong answers for integrals even if I enter them correctly?

While the Ti-nSpire is a powerful calculator, it is not infallible. There may be certain functions or integrals that it cannot accurately solve due to their complexity. In these cases, it is best to check your work with another calculator or by hand to confirm the answer.

5. Are there any common mistakes that can cause the Ti-nSpire to give incorrect answers for integrals?

One common mistake is forgetting to include the variable of integration in the integrand. Another mistake is entering the limits of integration in the wrong order. It is also important to make sure that your calculator is in the correct mode and that you have entered the function and limits correctly. Additionally, if the function being integrated is discontinuous or has sharp turns, the calculator may struggle to accurately solve the integral.

Similar threads

  • Calculus and Beyond Homework Help
Replies
9
Views
865
  • Calculus and Beyond Homework Help
Replies
28
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
622
  • Calculus and Beyond Homework Help
Replies
20
Views
460
  • Calculus and Beyond Homework Help
Replies
3
Views
346
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
24
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
31
Views
2K
  • Calculus and Beyond Homework Help
Replies
17
Views
2K
Back
Top