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.
Will this do what you want?
HoldForm[Integrate[x^2,{x,1,3}]]+Sin[z]
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\)\)
Hi Zhonghui,
Try this
Integrate[eq1, {t, 0, T}] // Inactivate
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[expr] replaces all instances of f with Inactive[f] for
symbols f used as heads in expr.
Inactive[f] is an inactive form of f.
Well, the difference between Inactivate and Inactive is not easy to understand
[1]: Inactivate—Wolfram Documentation
[2]: Inactive—Wolfram Documentation
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}]