-4

I am not able to integrate this function.
I am getting an error: argument "y" is missing, with no default. The answer to this problem is 1.

enter image description here

Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
Amish Sharma
  • 196
  • 2
  • 12
  • 1
    Could you please provide a [reproducible example](https://stackoverflow.com/a/5963610/2060081)? I cannot make out the function from your LaTeX. – sempervent Mar 10 '20 at 11:46
  • Hi Amish Sharma, Welcome to StackOverflow! If you want to improve your question, here is some information on [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and how to give a [minimale reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610). The MRE will make it easier for others to find and test a answer to your question. That way you can help others to help you! – dario Mar 10 '20 at 11:46
  • Actually, I can't insert images to display the equation, as I don't have enough reputation. Thanks @Stéphane Laurent for editing my question and inserting an image. – Amish Sharma Mar 10 '20 at 11:55
  • If you want to, you could read the content of the links that were provided. A MRE is explicitly **not** picture of code or data or formulas... – dario Mar 10 '20 at 11:57

1 Answers1

1

First of all, your expression is actually a function of y.

If you want to write the double integral, you can make it with integrate (but you need to simplify the integral a bit in advance)

f <- function(y) 6*integrate(function(x) x,0,1)$value*integrate(function(z) z**2,0,y)$value/y**2

Mathematically, you can derive that, the function f can be further simplified to

f <- function(y) y
ThomasIsCoding
  • 96,636
  • 9
  • 24
  • 81