TransWikia.com

If I don't want Pi to be calculated, what should I do?

Mathematica Asked by White0-0 on November 28, 2020

Dt[0.04Cos[10Pi x]Cos[50Pi t]]

As the titile described, I don’t want the Pi to be calculated. I just want it to exist in the form "Pi".
enter image description here

One Answer

To make Pi inert, you can wrap it with Hold[] or HoldForm[].

Dt[0.04 Cos[10 HoldForm[Pi] x] Cos[50 HoldForm[Pi] t]]

enter image description here

Some details :

Hold[exp] prevents exp to be evaluated whatever exp is.

HoldForm is equivalent to Hold except that it is not visible in OutputForm.

If you do not want to change every Pi manually, you can do :

 With[{Pi = HoldForm[Pi]},
    Dt[0.04 Cos[10 Pi x] Cos[50 Pi t]]
    ]  

You can retrieve the numerical value of an expression containing some HoldForm[Pi] with ReleaseHold wrapped around the whole expression.

Correct answer by andre314 on November 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP