I solved this problem by using pde solver (pdepe) instead of pde toolbox. I needed to convert the sine gordon equation with du/dt term into a system of two pde as belows:
u1_t=u2
u2_t=u1_xx-sin(u1)+a*u2
and solved for both u1 and u2.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!