Solving the Heat Equation with R Code

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
verling
Messages
1
Reaction score
0
Hi!

I have some trouble understanding this question. Could someone help me with it? Thanks!

Solve the following with the explicit method from t=0 to t=0.5 with h=1/10 and with μ(=k/h2)=0.5

ut = uxx, -1 ≤ x ≤ 1, t>0
u(0,x) = cos(x), -1 ≤ x ≤ 1
u(t,-1) = u(t,1) = e-tcos1, t>0

Compute the max-norm and the 2-norm of the error for t=0.1, 0.2, 0.3, 0.4, 0.5

Really clueless as to how to solve it! Please help! Thanks!
 
Physics news on Phys.org