Integration with series. - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Integration with series. (/thread-16966.html) |
Integration with series. - t_angenbrandt - 05-17-2021 10:54 PM The CAS does not detect that a series is 0 for the PDF of the binomial random distribution above k=n, so there are some simplifications that can be made with this assumption; [attachment=9483] I use the following program to calculate the variance in the value-domain: Code:
The program is limited for binomial distribution that has been defined as a continuous function using Dirac(): It is basically identical to the usual schoolbook definition, but extended for a continuous argument. Code:
When this function, s_pdf_binom... is applied to s_var(), I get an integral as an answer (indicating that CAS could not integrate it). Example: Code:
Now here is what I want: How can I get some hint from the CAS, that it has failed to integrate something or has done something else that does not give me a desired result? One obvious way is simply by looking for "integrate" or "∫" characters in a string that is returned when integration is complete so that the program can then take a different approach to get the CAS to return a useful result. But is there a more elegant solution like some function I can call to check for CAS behaviour without assuming the variables all the time? (Not important but for the interested ones: for this example one might take the fourier-transform and evaluate it at s=0 for the mean value. The CAS perfectly works with this approach, but it takes sometimes a long time to calculate, so it is not always desirable.). |