12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.3 Partial Differential Equations • 263f := (x, t) →e (−(t+x)2) + piecewise(−t + x < 1 2 and t − x < 1 , 1, 0)2Now you can plot the solution.> plot3d( f, -8..8, 0..5, grid=[40,40] );Changing the Dependent Variable in a PDEThe following is the one-dimensional heat equation.> heat := diff(u(x,t),t) - k*diff(u(x,t), x,x) = 0;heat := ( ∂ ∂t∂2u(x, t)) − k ( u(x, t)) = 0∂x2 Try to find a solution of the form X(x)T (t) to this equation. Use theaptly named HINT option of pdsolve to suggest a course of action.> pdsolve( heat, u(x,t), HINT=X(x)*T(t));(u(x, t) = X(x) T(t)) &where[{ d dt T(t) = k _c 1 T(t), d 2dx 2 X(x) = _c 1 X(x)}]The result here is correct, but difficult to read.Alternatively, you can tell pdsolve to use separation of variables (asa product, ‘*‘) and then solve the resulting ODEs (using the ’build’option).> sol := pdsolve(heat, u(x,t), HINT=‘*‘, ’build’);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!