Lp norm with p rational number

Hey guys,

I have yet another question :wink:
Say I want to measure an error not in the usual L^2 norm, but instead, e.g., in the L^(3/2) norm.

Attached you’ll find a script with a Poisson example where my naive attempt of computing the L^(3/2) error does not work.

I would appreciate your help!

Best, Philipp

Attachment: poisson_pow.py

Hi Philipp,

I suggest you write your term as exp(1.5*log(ABS(…))) or ABS(…)*sqrt(ABS(…)).

Best, Christoph

Oh well, sometimes it is easier than it seems, thanks :slight_smile:

Just for the record, the following works:

def POW(a,b): return exp(log(a)*b) L32err = POW(Integrate(POW(ABS(gfu-exact),3/2),mesh),2/3)

Best, Philipp