I have an expression in the form of $\tt \frac{Sin[x]}{x}$ that I would like to simplify to the form of Sinc[x]. I've tried the Simplify, FullSimplify and TrigReduce, but none of them work.


all gives the result $\tt\frac{Sin[x]}{x}$. However

FullSimplify[Sin[x]/x == Sinc[x]]

gives True.

I have two questions:

  1. Is there a way to tell MMA that I prefer Sinc[x] than Sin[x]/x, so that it can simplify $\sin(x)/x$ to $\mathrm{sinc}(x)$?
  2. How doees TransformationFunctions and ComplexityFunction work in Simplify? Could you give some examples and explanations of how to use them to control the form of the outcome expression? Can I use them to let Mathematica apply my own defined simplify rules (for example in this case Sin[x]/x -> Sinc[x])? I found their documents are difficult to understand for me. Thanks.

update FullSimplify[Sin[x]/x,ComplexityFunction->Composition[StringLength,ToString,InputForm]] also doesn't work. However,


gives 8 which is larger than


which gives 7.

  • 1
    $\begingroup$ There are plenty of examples on this site for TransformationFunctions and ComplexityFunction... Also search for LeafCount both in the docs and this site and also see this question $\endgroup$
    – rm -rf
    Commented Feb 19, 2013 at 22:07
  • $\begingroup$ Re: I found their documents are difficult to understand for me . Yep, the docs need some time to get used to them, but be sure to invest enough time to get through that hurdle $\endgroup$ Commented Feb 19, 2013 at 22:12
  • $\begingroup$ take a look at the questions automatically appearing on the right of the page. they may help $\endgroup$
    – acl
    Commented Feb 19, 2013 at 22:17
  • $\begingroup$ Related: (7741) and (18144) $\endgroup$
    – Mr.Wizard
    Commented Feb 20, 2013 at 0:25

1 Answer 1


A transformation function is just any function that will take an expression to another expression you consider equivalent. For example, we can make one that takes Sin to Sinc.

sinctrans[expr_] := expr /. Sin[x_] :> x Sinc[x]

You could just use that by itself to do this substitution, but you can also add it to the TransformationFunctions of Simplify to do something more complicated.

Simplify[Sum[((-1)^n*x^(2*n))/(2*n + 1)!, 
     {n, 0, Infinity}], TransformationFunctions -> 
     {Automatic, sinctrans}]
(* Sinc[x] *)

Mathematica will generally use Sinc[x] over Sin[x]/x in these circumstances, since it has fewer elements. We can contrive an example where that's not the case and then introduce a ComplexityFunction that harshly penalizes any expression containing Sin:

Simplify[Sin[x], TransformationFunctions -> 
     {Automatic, sinctrans}, ComplexityFunction -> 
     (LeafCount[#1] + If[FreeQ[#1, Sin], 0, 10^3] & )]
(* x Sinc[x] *)
  • $\begingroup$ Alternatively, ComplexityFunction -> (Count[#, Sin[_], {-2}] &) $\endgroup$
    – chyanog
    Commented Apr 16, 2013 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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