# Question:How to execute the piecewise condition in pdsolve

## Question:How to execute the piecewise condition in pdsolve

Maple 18

Dear maple users

A fine day wishes to all

In my problem, L(z) is a piecewise condition.

L(z):

I have to calculate the f(x,t) value at x=0.71,t=1.12 and z=0.71 for L(z)=0..1.

How to calculate the f(x,t) value.JVB1.mw

 > restart:
 > with(PDEtools):
 > with(plots):
 > fcns := {f(x,t)};
 (1)
 > b1:=1.41:d:=0.5/1:xi:=0.1:ea:=0.5:ra:=2:
 > L:=z->piecewise(d<=z,1-2*xi*(cos((2*3.14)*((z-d)*(1/2))-1/4)-(7/100)*cos((32*3.14)*(z-d-1/2))),z<=d+1,1-2*xi*(cos((2*3.14)*((z-d)*(1/2))-1/4)-(7/100)*cos((32*3.14)*(z-d-1/2))),1);
 (2)
 > PDE1 :=ra*(diff(f(x,t),t))=+b1*(1+ea*cos(t))+(1/(L(z)^2))*((diff(f(x,t),x,x))+(1/x)*diff(f(x,t),x));
 (3)
 > IBC := {D[1](f)(0,t)=0,f(1,t)=0,f(x,0)=0};
 (4)
 > z:=0.71;
 (5)
 > sol:=pdsolve(eval([PDE1]),IBC ,numeric, time = t,spacestep = 0.025, timestep=0.0001): sol:-value(f(x,t), output=listprocedure);
 (6)
 > fN:=eval( f(x,t), sol:-value(f(x,t), output=listprocedure)):
 >