Skip to content
Prev 369616 / 398503 Next

Hi

Problems here ----------------^^^-----and if(a==1)-----^^^---paren--^
                              |||                      |||         |

Annotation only useful with monospaced font. Not likely to be useful to Moshe if he will be using HTML for posting.
How are you planning to handle a value of log(0)? Or for that matter division by 0 if a==1

R does do limiting integrations (if that is the correct term for lim(integrate(func, lower=0, ...)) with the value of func(0) undefined. You may need to set the lower limit of integration to be a small positive number.

R also has difficulties with fractional powers of negative numbers:
[1] NaN 

Did you perhaps intend `a` to be in the set: 2:9 ?

If I set: 

 my_f <- function(x, a=1.1, b=1.1)   # will error out with those defaults
                    {x*(log(x)+b)*((log(x)+b)^(a-1)-b^(a-1))/(a-1)*(b^(a-1))}
-0.5063435 with absolute error < 4.6e-09
-0.4829606 with absolute error < 3.5e-05
-0.4813907 with absolute error < 4.8e-05
excised meaningless confidentiality message
Do read the Posting Guide which advises not to use HTML.