# Drawing a function which contains an Integral

**URL:** <https://root-forum.cern.ch/t/drawing-a-function-which-contains-an-integral/47746>\
**Category:** Newbie\
**Created:** [November 21, 2021, 12:37am UTC](https://root-forum.cern.ch/t/drawing-a-function-which-contains-an-integral/47746 "2021-11-21T00:37:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SarahHamad](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@SarahHamad](https://root-forum.cern.ch/u/SarahHamad)\
**Post date:** [November 21, 2021, 12:37am UTC](https://root-forum.cern.ch/t/drawing-a-function-which-contains-an-integral/47746/1 "2021-11-21T00:37:09Z")

</div>

Hello,  
I am trying to draw this function:

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/7/1/7166c06d0d06147c541320f4d1368258c8093e9a.png)  
Do I need to find the integral at a set of points and then draw the function or is there a way to define the function as an integral in TF1, so it can be drawn easily?  
Thank you.

---

<div class="post-metadata">

**Author:** ![SarahHamad](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@SarahHamad](https://root-forum.cern.ch/u/SarahHamad)\
**Post date:** [November 21, 2021, 12:37am UTC](https://root-forum.cern.ch/t/drawing-a-function-which-contains-an-integral/47746/2 "2021-11-21T00:37:53Z")

</div>

The denominator can be modified to b 1- the integral from 0 till t if this makes it easier.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 21, 2021, 1:13am UTC](https://root-forum.cern.ch/t/drawing-a-function-which-contains-an-integral/47746/3 "2021-11-21T01:13:07Z")

</div>

[Wikipedia → Normal distribution](https://en.wikipedia.org/wiki/Normal_distribution)  
[Wolfram MathWorld → Normal Distribution](https://mathworld.wolfram.com/NormalDistribution.html)

[TMath::Gaus](https://root.cern.ch/doc/master/namespaceTMath.html#a1b1e666e3ef4e55ef616d81ac778b149)  
[ROOT::Math::gaussian\_pdf](https://root.cern.ch/doc/master/group__PdfFunc.html#ga58e74de4844774c4f2b9cdf2df4fb484)  
[ROOT::Math::normal\_pdf](https://root.cern.ch/doc/master/group__PdfFunc.html#ga14fc4b17c619aa37ef1e6be7e3d8f89b)

[TMath::Erf](https://root.cern.ch/doc/master/namespaceTMath.html#a44e82992cba4684280c72679f0f39adc)  
[ROOT::Math::erf](https://root.cern.ch/doc/master/group__SpecFunc.html#gaff6e08d4b2456feb8a76f50176241da5)

[TMath::Erfc](https://root.cern.ch/doc/master/namespaceTMath.html#a95e57e33b8b8a394c05866d9c1171024)  
[ROOT::Math::erfc](https://root.cern.ch/doc/master/group__SpecFunc.html#ga60f84ce394e77954ce47667200f7b6cd)

[ROOT::Math::normal\_cdf](https://root.cern.ch/doc/master/group__ProbFunc.html#ga87b8f827f201c75eeb002a632fc67840)
