How do you analytically solve PDE's in Matlab for example the 1-D Poisson Equation

4 views (last 30 days)
Alex on 5 Oct 2022
Commented: Alex on 5 Oct 2022
Hi there,
I'm reletively new to matlab and am wondering whether/how I can solve PDE's analytically. For example ∂²Φ/∂x² = 1. I would appreciate any advice/ what commands or rules I can use to do this. I very much appreciate any help anyone could provide in this matter.
Kindest Regards,
A

Torsten on 5 Oct 2022
Edited: Torsten on 5 Oct 2022
Usually, PDEs cannot be solved analytically in MATLAB.
Your "PDE" is a simple ODE with solution phi(x) = 1/2*x^2 + a*x + b with free constants a and b:
syms x
d2phidx2 = sym('1');
phi = int(int(d2phidx2,x),x)
phi =
For PDEs in one spatial dimension, MATLAB's "pdepe" is a numerical solver that can be used for PDEs of convection-diffusion-reaction type (not convection alone !)
Alex on 5 Oct 2022
Super, I'll look into it, thank you for your help and time.

Categories

Find more on Boundary Conditions in Help Center and File Exchange

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by