Please help me,
Hi, I’m really stuck with this program, this is the resolution of a wave equation with a control function.
t1 = 2;
indicator[x_] := Piecewise[{{1, 0 < x < 0.5}}, 0];
(* problème du controle*)
E1 = D[u[x, t], {x, 2}] - D[u[x, t], {t, 2}] == indicator[x] * (Cos[\[Pi] t1] + Sin[\[Pi] t1] + 2 Cos[\[Pi] x] Sin[2 \[Pi] t1]) Sin[\[Pi] x];
(*données initiales propres *)
ic = {u[x, 0] == Sin[\[Pi] x], Derivative[0, 1][u][x, 0] == \[Pi] Sin[\[Pi] x]};
(* Condition aux bord de Dirichlet*)
bc = {u[0, t] == 0, u[1, t] == 0};
(*résolution analytique de l'équation *)
sol = DSolve[{E1, ic, bc}, u, {x, t}]
If I try to solve this problem there, like that, it’s not working, but if I delete the function indicator[x] it works. I don’t know where the problem is?
Have I not well-defined indicator function?



