Wolfram Alpha (free) Limitations

In summary, when trying to integrate an equation with an inverse function, the Wolfram engine returns a more complicated result without the inverse. However, if simplifying a single parameter makes the integration easier, the engine produces the same result as the paid version.
  • #1
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2023 Award
27,886
19,380
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
  • #2
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
  • #3
1644524434807.png
 
  • Like
Likes benorin and Wrichik Basu
  • #4
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
  • #5
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:
  • #6
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.
 
  • #7
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##.
 
  • #8
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

FAQ: Wolfram Alpha (free) Limitations

What is Wolfram Alpha?

Wolfram Alpha is a computational knowledge engine that provides answers to factual questions by computing data from various sources.

Is Wolfram Alpha free to use?

Yes, there is a free version of Wolfram Alpha that can be accessed through their website or mobile app. However, there is also a paid Pro version with additional features and capabilities.

What are the limitations of the free version of Wolfram Alpha?

The free version of Wolfram Alpha has limited access to certain data sets and only allows a certain number of queries per day. It also does not include some of the advanced features available in the Pro version.

Can Wolfram Alpha be used for complex mathematical calculations?

Yes, Wolfram Alpha is known for its ability to solve complex mathematical equations and perform various calculations. However, the free version may have limitations on the complexity and number of calculations that can be performed.

Can Wolfram Alpha be used for academic or professional purposes?

Yes, Wolfram Alpha can be used for academic and professional purposes. However, the free version may not have all the data and capabilities necessary for advanced research or analysis. The Pro version may be more suitable for these purposes.

Similar threads

Back
Top