An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111204/834036ef/attachment.pl>
upper bound in the integrate function depends on a parameter
9 messages · grttt nbbfg, David Winsemius, e eeyore +2 more
On Dec 3, 2011, at 10:23 PM, grttt nbbfg wrote:
Sorry for my English, is not my first language.. I have some trouble in terms of using integrate function in R. fx is a function of m and x where m is supposed to be a unknown parameter.
R is not an algebraic solver (and R-help is not a homework list.).
fx=function(m,x){
+ x*2/(3*m)*(1-x/(3*m)) + } The problem is in upper bound, it depends on parameter m.
integrate(fx,lower=0,upper=3*m)$value
Is it possible to use the integrate function when bounds depend on a parameter?
If it is known, yes. You could also do some investigation: curve(x*2/(3*5)*(1-x/(3*5)), 0, 15)
How to define m to solve this integral? The result should be m.
As I said, no homework answers here.
David Winsemius, MD West Hartford, CT
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111204/cce7d4cb/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111204/fa49f758/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111204/e5036ea5/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111204/bc68bf44/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111204/6abcd214/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111204/94194dc6/attachment.pl>
Jorge I Velez <jorgeivanvelez <at> gmail.com> writes:
And remember:
#install.packages('fortunes')
require(fortunes)
fortune('Yoda')
Evelyn Hall: I would like to know how (if) I can extract some of the
information
from the summary of my nlme.
Simon Blomberg: This is R. There is no if. Only how.
-- Evelyn Hall and Simon 'Yoda' Blomberg
R-help (April 2005)
Yes, although if you really wanted to compute (symbolic) indefinite integrals, it would be awfully hard. R is Turing-complete so of course you could do it ... but ... Ben Bolker