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

  • 1
    $\begingroup$ You could use \[DoubledPi] temporarily instead of \[Pi], and make replacements afterwards if you need to e.g. plot them. $\endgroup$ – J. M.'s discontentment Sep 23 at 1:15
  • 2
    $\begingroup$ Try having nothing with a decimal point. Turn 0.04 into 4/100 and see if that is enough to leave Pi unchanged. Usually any decimal point will then turn all exact quantities into approximate quantities with their own decimal points. $\endgroup$ – Bill Sep 23 at 1:35
  • 3
    $\begingroup$ Dt[0.04 Cos[10 Pi x] Cos[50 Pi t] // Rationalize] // Simplify $\endgroup$ – Bob Hanlon Sep 23 at 2:20

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.