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

2 views (last 30 days)
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

Answers (1)

Torsten
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 !)

Tags

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!