0

My question regards the following boundary value problem:

NDSolve[
 {
  D[u[t, x], t] == D[u[t, x], x, x],
  u[0, x] == 0, 
  u[t, 0] == Sin[t], u[t, 5] == 0
 }, u, {t, 0, 10}, {x, 0, 5}
]

The equations describe the temperature u[t,x] in a slab or bar. The problem I encounter is when I try to change the boudary condition u[t,5]==0 into one which prescribes (thermal) isolation for every instant (t) on the boundary x=5. That means the x derivative on x=5 is zero at every instant. How do I define such a boundary condition?

Lukas Lang
  • 33,963
  • 1
  • 51
  • 97

1 Answers1

1

Use this

(D[u[t, x], x] /. x -> 5) == 0

or

Derivative[0, 1][u][t, 5] == 0
zhk
  • 11,939
  • 1
  • 22
  • 38