Mathematica Mistake? Solve Puzzling Integration Issue

In summary, there is a discrepancy between the result obtained by integrating the expanded form of (nx+1)^2 and integrating the individual parts separately. However, this is not a mistake on Mathematica's part as integration is only defined up to a constant, and the constant in this case is a direct result of the chain rule.
  • #1
keniwas
59
1
There is something pretty strange going on with mathematica right now.

When I do the following function
Code:
Integrate[(n x + 1)^2,x]

I get the result
[tex]\frac{(1+nx)^3}{3n}[/tex]
Expanded this is
[tex]\frac{1}{3 n}+x+n x^2+\frac{n^2 x^3}{3}[/tex]

However this is not the result I get if I integrate the individual parts of the expansion
[tex](nx+1)^2=1+2nx+n^2x^2[/tex]
and add the results of the integrals
i.e.
Code:
Integrate[n^2 x^2, x] + Integrate[2*n*x, x] + Integrate[1, x]

which gives me
[tex]x+n x^2+\frac{n^2 x^3}{3}[/tex]

Please tell me I am missing somthing obvious and mathematica isn't making a mistake?
 
Physics news on Phys.org
  • #2
If you integrate w.r.t x, then 1/(3n) is a constant. You have not given integration boundaries, so this is allowed. In other words, since D[1/(3n), x] = 0, both results differentiate back to [itex](nx + 1)^2[/itex].
 
  • #3
Granted it is allowed, why would it choose such an esoteric constant? Like you said I didn't provide it any boundary conditions, so what's so special about this constant? It seems rather unusal to me, and its not a behavior I have seen from the software before when performing integration that I am aware of.
 
  • #4
The constant is not particularly esoteric. It is a direct result of applying the chain rule to (n x + 1)^2. In any case, as mentioned above integration is only defined up to a constant, so there is no mistake here other than the fact that the constant is not explicitly mentioned (which I think it should do).
 

1. What is Mathematica Mistake?

Mathematica Mistake is a common error that occurs when using the Mathematica software for mathematical computations. It can refer to any incorrect or unexpected result that is obtained while using the software.

2. What is a Puzzling Integration Issue in Mathematica?

A Puzzling Integration Issue in Mathematica refers to a specific type of mistake that occurs when trying to integrate a function using the software. It can result in incorrect or unexpected solutions to integration problems.

3. How can I solve a Puzzling Integration Issue in Mathematica?

There are several steps you can take to try and solve a Puzzling Integration Issue in Mathematica. First, check for any typos or errors in the input. You can also try using different integration methods or adjusting the integration limits. If the issue persists, it may be helpful to consult online resources or seek assistance from other Mathematica users.

4. Why do Puzzling Integration Issues occur in Mathematica?

Puzzling Integration Issues can occur in Mathematica due to a variety of reasons. These can include errors in the input, limitations of the software's algorithms, or the complexity of the function being integrated. It is important to carefully review the input and consider alternative methods if a Puzzling Integration Issue arises.

5. How can I avoid making a Mathematica Mistake?

To avoid making a Mathematica Mistake, it is important to carefully review the input and double-check for any typos or errors. It may also be helpful to consult online resources or seek assistance from experienced users. Additionally, regularly updating to the latest version of Mathematica can help prevent potential errors and issues.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
904
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
217
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
932
Back
Top