I am trying to solve ut=14uxx
$-\infty
With the initial condition u(x,0)=ϕ(x) where
ϕ(x)={1|x|<10|x|≥1
So I initially typed in my piecewise function like this
ϕ[x_] := Piecewise[{{1, Abs[x]<1}, {0, Abs[x] >= 1}}]
But I have also tried this, (are they both valid, or is just one, or is neither?)
ϕ[x_] := Piecewise[{{1, -1 < x < 1}, {0, x >= 1 || x <= -1}}]
Then, following the mathematica examples I tried to solve the differential equation:
pde = D[u[x, t], t] - 1/4 D[u[x, t], {x, 2}] == 0
soln = DSolve[{pde, u[x, 0] == ϕ[x]}, u[x, t], {x, t}]
Which outputs a bunch of weird stuff, not the solution (I think) I was expecting. If my math is correct I think the solution to this would involve the error function. Any tips to where I might be going wrong would be aprreciated!
Comments
Post a Comment