derivative of a function

后端 未结 2 1900
太阳男子
太阳男子 2021-01-30 15:11

I am using D to get derivatives of a function. However, R does not simplify the expression when returning the derivative. I need to figure out if a function has a derivative tha

2条回答
  •  余生分开走
    2021-01-30 15:37

    As far as I know, R will not simplify the result of D(). It sounds as though you want a proper computer algebra system, and R is definitely not a full CAS. Mathematica and Maple are the most well-known, but there are also a number of open-source alternatives (as discussed on this SO post).

    R can do numerical integration - for this kind of question it is worth searching in the R help pages first (i.e. help.search('integrate')). You can use integrate() in the stats package. There is also area() in the MASS package, but that is much simpler (i.e. for demonstration purposes).

提交回复
热议问题