# How to merely show an expression rather running it?

**URL:** <https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695>\
**Category:** Questions\
**Tags:** mathematica\
**Created:** [August 17, 2021, 6:52am UTC](https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695 "2021-08-17T06:52:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ouzhonghui](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/ouzhonghui/32/41923_2.png) [@ouzhonghui](https://community.wolfram.com/u/ouzhonghui)\
**Post date:** [August 17, 2021, 6:52am UTC](https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695/1 "2021-08-17T06:52:17Z")

</div>

When I used the command “Integrate”, it ran a long time, but it didn’t get any result yet.  
So I just want the expression to be showed out rather than running it for saving time.  
Would you like to tell me how to realize it?  
Thanks in advance.

---

<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:** [August 17, 2021, 8:24am UTC](https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695/2 "2021-08-17T08:24:30Z")

</div>

Will this do what you want?

```
HoldForm[Integrate[x^2,{x,1,3}]]+Sin[z]

```

---

<div class="post-metadata">

**Author:** ![ouzhonghui](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/ouzhonghui/32/41923_2.png) [@ouzhonghui](https://community.wolfram.com/u/ouzhonghui)\
**Post date:** [August 17, 2021, 10:27am UTC](https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695/3 "2021-08-17T10:27:07Z")

</div>

If the integrand is complicated, and it needs to be written out firstly and then it will be integrated.  
If I have done as you suggested, it would be

```
In[85]:= eq1 = -A6 (1/(Sqrt[\[Pi]] Sqrt[t]) - 
    A8 E^(A8^2 t) Erfc[A8 Sqrt[t]]) Erfc[A7/(2 Sqrt[-t + T])]

Out[85]= -A6 (1/(Sqrt[\[Pi]] Sqrt[t]) - 
   A8 E^(A8^2 t) Erfc[A8 Sqrt[t]]) Erfc[A7/(2 Sqrt[-t + T])]

In[87]:= eq2 = HoldForm[Integrate[eq1, {t, 0, T}]]

Out[87]= \!\(
TagBox[
RowBox[{
SubsuperscriptBox["\[Integral]", "0", "T"], 
RowBox[{"eq1", 
RowBox[{"\[DifferentialD]", "t"}]}]}],
HoldForm]\)

```

which is not what I wanted.  
What I wanted is

```
\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(T\)]\(\(\(-A6\)\ \((
\*FractionBox[\(1\), \(
\*SqrtBox[\(\[Pi]\)]\ 
\*SqrtBox[\(t\)]\)] - A8\ 
\*SuperscriptBox[\(E\), \(
\*SuperscriptBox[\(A8\), \(2\)]\ t\)]\ Erfc[A8\ 
\*SqrtBox[\(t\)]])\)\ Erfc[
\*FractionBox[\(A7\), \(2\ 
\*SqrtBox[\(\(-t\) + T\)]\)]]\) \[DifferentialD]t\)\)

```

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [August 17, 2021, 1:59pm UTC](https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695/4 "2021-08-17T13:59:47Z")

</div>

Hi Zhonghui,

Try this

```
Integrate[eq1, {t, 0, T}] // Inactivate

```

---

<div class="post-metadata">

**Author:** ![hansmilton](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hansmilton/32/8656_2.png) [@hansmilton](https://community.wolfram.com/u/hansmilton)\
**Post date:** [August 17, 2021, 5:40pm UTC](https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695/5 "2021-08-17T17:40:27Z")

</div>

As Rohit has shown `Inactivate` does what Zhonghui asked for. But `Inactive` does not. What is the difference between the two functions? Lets check the documentation:

[Inactivate](https://reference.wolfram.com/language/ref/Inactivate.html?q=Inactivate)

> Inactivate[expr] replaces all instances of f with Inactive[f] for  
> symbols f used as heads in expr.

[Inactive](https://reference.wolfram.com/language/ref/Inactive.html?q=Inactive)

> Inactive[f] is an inactive form of f.

Well, the difference between `Inactivate` and `Inactive` is not easy to understand  
[1]: [Inactivate—Wolfram Documentation](https://reference.wolfram.com/language/ref/Inactivate.html?q=Inactivate)  
[2]: [Inactive—Wolfram Documentation](https://reference.wolfram.com/language/ref/Inactive.html?q=Inactive)

---

<div class="post-metadata">

**Author:** ![ouzhonghui](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/ouzhonghui/32/41923_2.png) [@ouzhonghui](https://community.wolfram.com/u/ouzhonghui)\
**Post date:** [August 18, 2021, 1:01am UTC](https://community.wolfram.com/t/how-to-merely-show-an-expression-rather-running-it/18695/6 "2021-08-18T01:01:17Z")

</div>

Yes, it works now and it doesn’t waste time on the operation without result.

```
In[278]:= eq56 = (eq54 /. {t -> \[Tau]})*(eq55 /. {t -> t - \[Tau]}) //
    Simplify // Normal

Out[278]= B10 (-B6 + (2 E^(-(B6^2/(4 \[Tau]))) Sqrt[\[Tau]])/
   Sqrt[\[Pi]] + 
   B6 Erf[B6/(2 Sqrt[\[Tau]])]) (-(1/(Sqrt[\[Pi]] Sqrt[t - \[Tau]])) +
    B7 E^(B7^2 (t - \[Tau])) Erfc[B7 Sqrt[t - \[Tau]]])

In[279]:= eq57 = Integrate[eq56, {\[Tau], 0, t}] // Inactivate

Out[279]= 
Inactive[Integrate][
 B10 (-B6 + (2 E^(-(B6^2/(4 \[Tau]))) Sqrt[\[Tau]])/Sqrt[\[Pi]] + 
    B6 Erf[B6/(2 Sqrt[\[Tau]])]) (-(1/(
     Sqrt[\[Pi]] Sqrt[t - \[Tau]])) + 
    B7 E^(B7^2 (t - \[Tau])) Erfc[B7 Sqrt[t - \[Tau]]]), {\[Tau], 0, 
  t}]

```
