keniwas
- 57
- 1
There is something pretty strange going on with mathematica right now.
When I do the following function
I get the result
\frac{(1+nx)^3}{3n}
Expanded this is
\frac{1}{3 n}+x+n x^2+\frac{n^2 x^3}{3}
However this is not the result I get if I integrate the individual parts of the expansion
(nx+1)^2=1+2nx+n^2x^2
and add the results of the integrals
i.e.
which gives me
x+n x^2+\frac{n^2 x^3}{3}
Please tell me I am missing somthing obvious and mathematica isn't making a mistake?
When I do the following function
Code:
Integrate[(n x + 1)^2,x]
I get the result
\frac{(1+nx)^3}{3n}
Expanded this is
\frac{1}{3 n}+x+n x^2+\frac{n^2 x^3}{3}
However this is not the result I get if I integrate the individual parts of the expansion
(nx+1)^2=1+2nx+n^2x^2
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
x+n x^2+\frac{n^2 x^3}{3}
Please tell me I am missing somthing obvious and mathematica isn't making a mistake?