Wolfram Alpha (free) Limitations

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 3K views
Messages
29,796
Reaction score
21,619
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   Reactions: 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   Reactions: PeroK
1644524434807.png
 
  • Like
Likes   Reactions: 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   Reactions: 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:
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   Reactions: benorin