# (Help Integral) Age of open matter dom universe

1. May 11, 2014

### ChrisVer

1. The problem statement, all variables and given/known data
For the problem see the attachment, I am trying to evaluate this integral... but the fun part is that I am getting totally different results

3. The attempt at a solution

First of all, I tried to put the integral in the Mathematica, but the first result contained logarithms rather than arcosh... Also let me write $x$ instead of $a$...
Then I saw that the author points out the substitution $x= \frac{\Omega_{0m}}{1-\Omega_{0m}} sinh^{2}(\psi/2)$
So I said let's try setting:
$x= \frac{\Omega_{0m}}{1-\Omega_{0m}} u^{2}$
$dx=\frac{\Omega_{0m}}{1-\Omega_{0m}} du^{2}$
$x=0 \rightarrow u^{2}=0$ and $x=1 \rightarrow u^{2}=\frac{\Omega_{0m}}{1-\Omega_{0m}}=A$ (I name it A in order to write nicely the integral here)
In that form the integral will be written:
$\frac{1}{H_{0}} \int_{0}^{A} du^{2} \frac{\Omega_{0m}}{1-\Omega_{0m}} \frac{1}{\sqrt{1-\Omega_{0m}+ \frac{1-\Omega_{0m}}{u^{2}}}}$

So far I don't think I am doing anything wrong, now in the denominator I can take out a $1- \Omega_{0m}$ to write it better:
$\frac{1}{H_{0}} \int_{0}^{A} du^{2} \frac{\Omega_{0m}}{(1-\Omega_{0m})^{3/2}} \frac{1}{\sqrt{1+\frac{1}{u^{2}}}}= B \int_{0}^{A} du^{2} \frac{1}{\sqrt{1+\frac{1}{u^{2}}}}$

Where, in the last equation, I just put all the constants in a B...
Nevermind, trying to solve that integral in the mathematica, I am getting this result:
$\int \frac{dy}{\sqrt{1+\frac{1}{y}}}=\sqrt{y+y^{2}} - \frac{1}{2} ln(2\sqrt{y+y^{2}}+2y+1)$
by setting $y=u^{2}$

Going even further, I tried to take the $u^{-2}$ out of the square root:
$B \int_{0}^{A} du^{2} \frac{1}{\sqrt{(1+u^{2})\frac{1}{u^{2}}}}$
which can be written as:
$B \int_{0}^{A} du^{2} \frac{u}{\sqrt{(1+u^{2})}}=B \int_{0}^{A} \frac{2u^{2}du}{\sqrt{(1+u^{2})}}$

The mathematica for this same result, gives this answer:
$\int \frac{2u^{2}du}{\sqrt{(1+u^{2})}}=u \sqrt{u^{2}+1}-sinh^{-1}(u)$
which is again wrong comparing to what I need (as the attachment states I need the cosh-1...)

After that I even tried to put $u=sinh(\psi/2)$ as indicated in the abstract....
$B \int_{0}^{A} \frac{2sinh^{2}(\psi/2) dsinh(\psi/2)}{\sqrt{(1+sinh^{2}(\psi/2))}}$
$B \int_{0}^{A} \frac{2sinh^{2}(\psi/2) cosh(\psi/2) d(\psi/2)}{\sqrt{(1+sinh^{2}(\psi/2))}}$

Mathematica gives:
$\int \frac{2sinh^{2}(x) cosh(x) dx}{\sqrt{(1+sinh^{2}(x))}}= \frac{ cosh(x)[sinh(x)cosh(x)-x]}{\sqrt{cosh^{2}(x)}}=sinh(x)cosh(x)-x$
What I am doing wrong?

#### Attached Files:

• ###### LatEx.jpg
File size:
28.9 KB
Views:
72
Last edited: May 11, 2014
2. May 11, 2014

### Bill Simpson

If you could scrape your raw Mathematica code and paste that into a code box, or just attach the notebook as a file, and post here, rather than taking all the effort to desktop publish it so that the reader has to take all the effort to reverse all your work, then there might be a chance.

Start Mathematica fresh, do a single evaluation of your entire notebook, don't hide any of the critical results and then on the last line include a bit of text saying "and I need that last result in this form instead of that form."

Use as little fancy formatting and reverse pink italic dancing subsupersubsupersuperscriped Olde English font etc, etc, etc in your Mathematica code as possible and you will have by far the greatest likelihood of getting an answer.

Thank you

Last edited: May 11, 2014
3. May 12, 2014

### ChrisVer

http://integrals.wolfram.com/index.jsp
The functions I integrated above, are:
1/(1+(1/x))^(1/2)

2x^(2)/(1+x^(2))^(1/2)

2cosh[x](sinh[x])^(2)/(1+(sinh[x])^(2))^(1/2)

4. May 12, 2014

### Bill Simpson

Thank you. Now there is far less opportunity for misunderstanding.

I believe I have reproduced this using Mathematica.

Code (Text):
In[1]:= Integrate[1/Sqrt[1 + 1/x], x]

Out[1]= Sqrt[1 + 1/x] x - 1/2 Log[1 + (2 + 2 Sqrt[1 + 1/x]) x]

In[2]:= Simplify[Integrate[2 x^2/Sqrt[1 + x^2], x]]

Out[2]= x Sqrt[1 + x^2] - ArcSinh[x]

In[3]:= Assuming[x \[Element] Reals,Simplify[Integrate[2Cosh[x]Sinh[x]^2/Sqrt[1+Sinh[x]^2],x]]]

Out[3]= -x + Cosh[x] Sinh[x]
Mathematica and all of Wolfram Inc. has a very definite idea about what form it wants to put results into. You will not change their mind about that. But it is sometimes possible with the application of varying degrees of coaxing and sometimes simple brute force to get it to grudgingly put something into another form for you.

Mathematica often assumes that all variables are in the Complex domain, unless specifically told otherwise. People will routinely assume without thinking that some simplification is valid, when it is only valid for a Real variable.

Now you want Out[1] to be in what form?

And you want Out[2] to be in what form?

And you want Out[3] to be in what form?

Sometimes it is possible to try to confirm that two expressions are the same by trying to simplify the difference of them and see if the result can be hammered into the form zero. Computer algebra tools are often far better at simplifying to zero than than they are at contorting an expression into some desired form.

You might also keep in mind that the abilities and form of results may differ considerably between integrals.wolfram.com and wolframalpha.com and Mathematica, even though they each have parts of the same math engine behind the scenes.

Last edited: May 12, 2014
5. May 12, 2014

### ChrisVer

The problem is, as stated in the attachment, that the result should be proportional to
$arcosh[(expression)]$
something that the mathematica does not give... even by looking how the integral limits change by changing variables, I don't see how this could be done... except for if the attachment is actually wrong??? hehehe

6. May 12, 2014

### Bill Simpson

Your attachment is showing a definite integral between 0 and 1 with one free parameter other than the variable of integration.

The examples you have shown are all indefinite integrals with no free parameter.

I can do definite integrals of all your examples, without the parameter, but I don't know how to relate any of those results to what is shown in the attachment.

If we can drag this process to get Mathematica to give what is supposed to be equivalent to the result in the attachment then maybe we can try to tell whether they really are equivalent or not.

Last edited: May 12, 2014
7. May 12, 2014

### ChrisVer

definite or indefinite, the result should have an arcosh in order to give this result at the endpoints (for x=0 to 1, for y=0 to $\frac{Ω_{m0}}{1-Ω_{m0}}$ or u=0 to $\sqrt{\frac{Ω_{m0}}{1-Ω_{m0}}}$). That's where my probblem is...

8. May 12, 2014

### Bill Simpson

Code (Text):
In[1]:= Integrate[1/Sqrt[1 + 1/x], {x, 0, 1}]

Out[1]= Sqrt[2] - 1/2 Log[3 + 2 Sqrt[2]]

In[2]:= Integrate[2 x^2/Sqrt[1 + x^2], {x, 0, 1}]

Out[2]= Sqrt[2] - ArcSinh[1]

In[3]:= Integrate[2 Cosh[x] Sinh[x]^2/Sqrt[1 + Sinh[x]^2], {x, 0, 1}]

Out[3]= 1/2 (-2 + Sinh[2])

9. May 12, 2014

### ChrisVer

If you tried to put in mathematica the initial integral? given in the attachement...
1/(1-a+(a/x))^(1/2) form x=0 to 1?
would that bring out arccosh?

10. May 12, 2014

### Bill Simpson

Code (Text):
In[1]:= Integrate[1/(1 - a + (a/x))^(1/2), {x, 0, 1}]

Out[1]= ConditionalExpression[1/(1 - a) - (a ArcSinh[Sqrt[-1 + 1/a]])/(1 - a)^(3/2),
(Re[a/(-1 + a)] == 0 || Re[a/(1 - a)] >= 0 || Re[a/(-1 + a)] >= 1 ||
a/(-1 + a) \[NotElement] Reals) && Re[a] > 0]
What do you know about the domain of 'a' so this can be simplified further?

Note: '||' is the notation for boolean Or, '&&' is the notation for boolean And.
And Re[] extracts the Real component.

11. May 12, 2014

### ChrisVer

0<a<1... that's its domain.... but still it gave you the arcsinh so, I think it's a mistype in the attachment afterall...

12. May 12, 2014

### Bill Simpson

Code (Text):
In[3]:= Expand[Assuming[0 < a < 1, Integrate[1/(1 - a + (a/x))^(1/2), {x, 0, 1}]]]

Out[3]= 1/(1 - a) + a/(Sqrt[1 - a] (-1 + a))ArcSinh[Sqrt[-1 + 1/a]]
which has some similarity to your attachment

1/(1 - a) - a/(2 (1 - a)^(3/2)) ArcCosh[2/a - 1]

but we are missing a factor of 2 in the second denominator and the hyperbolic args don't match.

but if I plot both those over 0 to 1 they appear to be the same.

So let's see if we can coax Mathematica into telling us that they really are the same.

Code (Text):
In[7]:= Assuming[0 < a < 1,
FullSimplify[-(1/(-1 + a)) + (a ArcSinh[Sqrt[-1 + 1/a]])/(Sqrt[1 - a] (-1 + a)) ==
1/(1 - a) - a/(2 (1 - a)^(3/2)) ArcCosh[2/a - 1]]]

Out[7]= ArcCosh[-1 + 2/a] == 2 ArcSinh[Sqrt[-1 + 1/a]]
Well, numerically are they close?

Code (Text):
In[8]:= Table[a = RandomReal[{0, 1}];
ArcCosh[-1 + 2/a] - 2 ArcSinh[Sqrt[-1 + 1/a]], {20}]

Out[8]= {-4.44089*10^-16, 0., 0., -2.22045*10^-16, 0., 2.22045*10^-16,
2.22045*10^-16, 0., -4.44089*10^-16, 0., 0., -5.55112*10^-17, 0.,
0., 0., 0., 0., 1.11022*10^-16, 0., 0.}
and those nonzero bits are probably all just roundoff errors.

But I just cannot get Mathematica to admit they are the same.

13. May 12, 2014

### Bill Simpson

Got it

Code (Text):
In[1]:= Assuming[0 < a < 1,
FullSimplify[TrigToExp[ArcCosh[-1 + 2/a]] == TrigToExp[2 ArcSinh[Sqrt[-1 + 1/a]]]]]

Out[1]= True
Force each side into exponential form and that was enough to get FullSimplify to see it.

Code (Text):
In[2]:= Assuming[0 < a < 1,
FullSimplify[
TrigToExp[Integrate[1/(1 - a + (a/x))^(1/2), {x, 0, 1}]] ==
TrigToExp[1/(1 - a) - a/(2 (1 - a)^(3/2)) ArcCosh[2/a - 1]]]]

Out[2]= True
But there is always the chance that there are small or large errors lurking in the darker corners of Mathematica.

Last edited: May 12, 2014
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://www.physicsforums.com/threads/help-integral-age-of-open-matter-dom-universe.753199/", "fetch_time": 1508279867000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2017-43/segments/1508187822513.17/warc/CC-MAIN-20171017215800-20171017235800-00121.warc.gz", "warc_record_offset": 1004367114, "warc_record_length": 21114, "token_count": 3280, "char_count": 9636, "score": 3.625, "int_score": 4, "crawl": "CC-MAIN-2017-43", "snapshot_type": "longest", "language": "en", "language_score": 0.7880589365959167, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00013-of-00064.parquet"}