Wolfram Alpha (free) Limitations

AI Thread Summary
The discussion highlights the limitations of the free version of Wolfram Alpha when solving certain integrals, particularly those involving complex functions. Users noted that simplifying parameters can lead to more manageable results, as seen with two different integrals that produced varying complexities. Comparisons were made with MATLAB and Mathematica, revealing that while Wolfram Alpha sometimes includes unnecessary complex functions, it can still provide useful insights when combined with traditional methods. The conversation emphasizes that Wolfram Alpha should be viewed as a supplementary tool rather than a complete solution. Overall, users recommend using it alongside manual calculations for better accuracy and understanding.
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2024 Award
Messages
29,108
Reaction score
20,729
When I put the following integral into the free version of Wolfram I get a sensible answer:
$$\int \frac{1}{(1 - \frac 1 u)\sqrt{\frac 1 u - a}}du$$The function includes an inverse ##\tanh## function that (as expected) diverges as ##u \to 1##. But, if I try:
$$\int \frac{1}{(1 - \frac 1 u)\sqrt{\frac 1 u - \frac 1 a}}du$$I get a much more complicated result without the inverse ##\tanh##, which appears not to diverge as ##u \to 1##.

The moral is, I guess, even simplifying a single parameter can make things easier for the engine.
 
  • Like
  • Informative
Likes benorin and Wrichik Basu
Physics news on Phys.org
Interesting. For comparison, I carried out the integral in MATLAB using the Symbolic Math Toolbox. Here is the code I used:
Matlab:
syms u a
ex1 = 1 ./ ((1 - 1/u) .* sqrt(1/u - a));
i1 = int(ex1, u);

ex2 = 1 ./ ((1 - 1/u) .* sqrt(1/u - 1/a));
i2 = int(ex2, u);

u = 1;

simplify(subs(i1))
simplify(subs(i2))

Line 10 returned NaN.

Line 11 returned the following expression:
$$\sqrt{-a}\,\mathrm{atanh}\left(\sqrt{-a}\,\sqrt{\frac{a-1}{a}}\right)\,\left(a+2\right)-a\,\sqrt{\frac{a-1}{a}}+\frac{\mathrm{atan}\left(\frac{{\left(a\,\left(a-1\right)\right)}^{7/2}\,\sqrt{\frac{a-1}{a}}\,1{}\mathrm{i}}{a^3\,{\left(a-1\right)}^4}\right)\,\sqrt{a\,\left(a-1\right)}\,2{}\mathrm{i}}{a-1}$$
It still has ##\mathrm{atanh}##, but is not NaN.
 
  • Like
Likes PeroK
1644524434807.png
 
  • Like
Likes benorin and Wrichik Basu
Mathematica gives the following result for the original integral:
$$-\frac{(2 a+1) \tan ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{a}}\right)}{a^{3/2}}-\frac{u \sqrt{\frac{1}{u}-a}}{a}+\frac{2 \tan ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{a-1}}\right)}{\sqrt{a-1}}$$ For the second integral, it gives the same answer with ##a## replaced by ##1/a##.
 
  • Like
Likes PeroK
vela said:
Mathematica gives the following result for the original integral:
$$-\frac{(2 a+1) \tan ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{a}}\right)}{a^{3/2}}-\frac{u \sqrt{\frac{1}{u}-a}}{a}+\frac{2 \tan ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{a-1}}\right)}{\sqrt{a-1}}$$ For the second integral, it gives the same answer with ##a## replaced by ##1/a##.
Suprisingly the derivatives of those functions are the same:
$$\frac{d}{du}\bigg (\frac{2 \tan ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{a-1}}\right)}{\sqrt{a-1}} \bigg ) = \frac{d}{du}\bigg (-\frac{2 \tanh ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{1-a}}\right)}{\sqrt{1-a}} \bigg )$$
When Wolfram produced the version with the second ##\tan^{-1}## function, I thought it must be wrong, as I needed the ##\tanh^{-1}## to convert to a log function.
 
Last edited:
It took me awhile to figure out how it diverged. When ##u=1##, the argument of the second arctan is equal to ##i##, and apparently, arctan has a pole there. I never knew that.
 
PeroK said:
Suprisingly the derivatives of those functions are the same:
$$\frac{d}{du}\bigg (\frac{2 \tan ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{a-1}}\right)}{\sqrt{a-1}} \bigg ) = \frac{d}{du}\bigg (-\frac{2 \tanh ^{-1}\left(\frac{\sqrt{\frac{1}{u}-a}}{\sqrt{1-a}}\right)}{\sqrt{1-a}} \bigg )$$
When Wolfram produced the version with the second ##\tan^{-1}## function, I thought it must be wrong, as I needed the ##\tanh^{-1}## to convert to a log function.
Of course, the functions apply to different regions. The LHS is valid for ##a > 1## and the RHS for ##a < 1##.
 
I once had a correspondence with Wolfram about their integrator. I had an integral that it wouldn't solve at all that I thought "ought" to be solvable. Similar to the OP case, I made the most obvious variable substitution, which made it no easier for me, but then Wolfram solved it no problem. Wolfram actually claimed that they didn't consider this a bug, and that the same would have happened on the fully paid version. It may have changed since, but they said Mathematica and Alpha do not do substitutions per se, and there would always be cases like the one I ran into.

I am also bothered by a tendency of the free version to unnecessarily include complex functions in their solutions for real integrals.

The upshot is you should only use it as an assist, combined with standard hand methods, which is fine. I am not normally looking for a black box to do everything.
 
Last edited:
  • Like
Likes benorin

Similar threads

Back
Top