1
$\begingroup$

I want to find (and plot) the integral of a 'smooth' version of the Möbius function MoebiusMu[x]:

bump[x_, a_] := 
 Piecewise[{{(Cos[2*Pi*x] + 1)/2, x - 1/2 < a < x + 1/2}, 
     {0, True}}]; 
bumpmob[x_, b_] := Sum[MoebiusMu[a]*bump[x, a], {a, 1, b}]; 
Show[DiscretePlot[MoebiusMu[a], {a, 25}], Plot[{bumpmob[x, 25]}, 
 {x, 0, 25}], GridLines -> Automatic]

enter image description here

I would like to integrate this function, but I'm not sure what syntax to use. Everything I try just seems to leave Mathematica evaluating without end - I suspect it's to do with either the fact that MoebiusMu[x] is a discrete function on integers only, or to do with having two variables.

I realise that this probably a very basic question (I have seen similar but much more complex questions on this site, but couldn't quite follow what was going on). Suggestions?

$\endgroup$
  • 1
    $\begingroup$ Many definitions are missing from that code. What's MoebiusMu what's mob1 what's units $\endgroup$ – chris Jan 1 at 11:36
  • $\begingroup$ OP now edited. Apologies - cut and pasted the wrong thing. MoebiusMu[x] is the built-in expression for the Möbius function. $\endgroup$ – Richard Burke-Ward Jan 1 at 12:08
  • $\begingroup$ Probably you want :NIntegrate ? $\endgroup$ – Mariusz Iwaniuk Jan 1 at 13:11
  • $\begingroup$ Hmmm. What I'd really like is a piecewise general integral rather than a partial integral between specified values... $\endgroup$ – Richard Burke-Ward Jan 1 at 13:22
1
$\begingroup$

What about

Integrate[bumpmob[x, 25], x]
$\endgroup$
  • $\begingroup$ Hi @Ulrich, that just produces the 'S'-sign image of the integral... $\endgroup$ – Richard Burke-Ward Jan 1 at 20:55
  • $\begingroup$ What means "'S'-sign image of the integral" ? $\endgroup$ – Ulrich Neumann Jan 1 at 21:17
  • $\begingroup$ It produces the standard symbol used in maths to mean 'integrate'. In other words, Mathematica evaluates Integrate[bumpmob[x, 25], x] as Integrate[bumpmob[x, 25], x]//TraditionalForm... $\endgroup$ – Richard Burke-Ward Jan 2 at 13:45
  • $\begingroup$ It is the Antiderivative of bumpmob, I think. And you are looking for what??? $\endgroup$ – Ulrich Neumann Jan 2 at 18:32

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.