# Function's value is always zero?

**URL:** <https://community.wolfram.com/t/functions-value-is-always-zero/22334>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [July 7, 2023, 9:30am UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334 "2023-07-07T09:30:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayashreedasofficial](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jayashreedasofficial](https://community.wolfram.com/u/jayashreedasofficial)\
**Post date:** [July 7, 2023, 9:30am UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/1 "2023-07-07T09:30:49Z")

</div>

![Screenshot2023-07-07at14-56-29new_I2.nb-mmm.pdf.png](https://global.discourse-cdn.com/wolfram/original/3X/b/b/bbabc1f2590b0ff0a143b5fb48d11ca229eb4db7.png)

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [July 7, 2023, 10:15am UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/2 "2023-07-07T10:15:06Z")

</div>

Your function contains extremely large or small numbers. The result may be meaningless if you are not very careful.

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [July 7, 2023, 11:36am UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/3 "2023-07-07T11:36:36Z")

</div>

Welcome to Wolfram Community! Please make sure you know the rules: [https://wolfr.am/READ-1ST](https://wolfr.am/READ-1ST)

The rules explain how to format your code properly. Posting code Images doesn’t help other members to copy your code. Please **EDIT** your post and make sure code blocks start on a new paragraph and look framed and colored like this.

```
int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

```

You can also embed notebook or attach notebook.

 ![Editor_WC_3.png](https://global.discourse-cdn.com/wolfram/original/2X/7/7bf045a0ac3b80bb1001ef8ca9b41d21ad36528c.png)

---

<div class="post-metadata">

**Author:** ![jayashreedasofficial](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jayashreedasofficial](https://community.wolfram.com/u/jayashreedasofficial)\
**Post date:** [July 7, 2023, 2:24pm UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/4 "2023-07-07T14:24:29Z")

</div>

The attached screenshot is the result from mathematica 13.1  
but I am attaching the program code of mathematica 9. There I have the plot of normalized wave function. So for all values of n it should give me 1 if we check the normalization of a individual state by integrating again. But the catch is that, when I tried to recheck the normalized condition of a state then for the lower values (n\<15) it’s giving the result 1. But the integration value is increasing (\>1) from n=15 and so on.. I checked here for n=51. Then the value was of the order of 10^46. Why does this type of contradiction occur? Please help me.. Please..

 ![Screenshot2023-07-07at19-35-59I2.nb-I2.pdf.png](https://global.discourse-cdn.com/wolfram/original/3X/a/d/ad56df9896dac0287aba4b1ab7b92338995d9fa9.png)

---

<div class="post-metadata">

**Author:** ![dontdont9](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dontdont9](https://community.wolfram.com/u/dontdont9)\
**Post date:** [July 7, 2023, 2:26pm UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/5 "2023-07-07T14:26:11Z")

</div>

β=4954/1000;  
μ=1156/100\*10^4;  
r0=503/100;  
d=0057/1000;  
[HBar]=1;  
α=16/10;  
nmax=116;  
λ=Sqrt[2 μ d r0^2/(β^2 [HBar]^2)];  
s[n\_]=2 λ-2 n-1;  
NN[n\_]=Sqrt[β s[n] Gamma[n+1]/(Gamma[2 λ-n] r0)];  
ξ[r\_]=2 λ E^(-β(r/r0-1));  
ψnλ[r\_,n\_]=NN[n] E^(-ξ[r]/2) ξ[r]^(s[n]/2) LaguerreL[n,s[n]ξ[r]];  
Plot[Abs[ψnλ[r,0]]^2,{r,0,6},PlotRange-\>All]

 ![graph.jpg](https://global.discourse-cdn.com/wolfram/original/3X/f/6/f602f254e40c602afce7a80a1a43f9affb48ec58.jpeg)

---

<div class="post-metadata">

**Author:** ![jayashreedasofficial](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jayashreedasofficial](https://community.wolfram.com/u/jayashreedasofficial)\
**Post date:** [July 7, 2023, 2:34pm UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/6 "2023-07-07T14:34:42Z")

</div>

What version of Mathematica have you used sir? Some results were coming in Mathematica 9. I am attaching that.. But there was a problem. There I have the plot of normalized wave function for all n up to n=nmax. So for all values of n it should give me 1 if I check the normalization of a individual state by integrating again. But the catch is that, when I tried to recheck the normalized condition of a state then for the lower values (n\<15) it’s giving the integration value 1. But this value is increasing (\>1) from n=15 and so on.. I checked here for n=51. The value is of the order of 10^46. Why does this type of contradiction occur? Please help me.. Please..

 ![Screenshot2023-07-07at19-35-59I2.nb-I2.pdf.png](https://global.discourse-cdn.com/wolfram/original/3X/a/d/ad56df9896dac0287aba4b1ab7b92338995d9fa9.png)

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [July 8, 2023, 6:02pm UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/7 "2023-07-08T18:02:38Z")

</div>

You typed `LaguerreL[n,s[n]ξ[r]]` instead of `LaguerreL[n,s[n],ξ[r]]`?

---

<div class="post-metadata">

**Author:** ![dontdont9](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dontdont9](https://community.wolfram.com/u/dontdont9)\
**Post date:** [July 8, 2023, 7:48pm UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/8 "2023-07-08T19:48:03Z")

</div>

Thank you for catching my mistake. When I correct that and I remove my 10^300 scaling factor then the plot matches and the integral is almost exactly 1.0

---

<div class="post-metadata">

**Author:** ![jayashreedasofficial](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jayashreedasofficial](https://community.wolfram.com/u/jayashreedasofficial)\
**Post date:** [July 9, 2023, 7:52am UTC](https://community.wolfram.com/t/functions-value-is-always-zero/22334/9 "2023-07-09T07:52:08Z")

</div>

Please help me to plot the function correctly. Why is there so much contradiction for all the versions?
