solve second order ODE equation

1 view (last 30 days)
Mark
Mark on 28 May 2022
Commented: Torsten on 29 May 2022
I try to symbolic the function psi_m(y) and psi_m(x) and solve the equation b with matlab obe solver. The results should come out as equation c.
However my matlab script indicate the error. Could you help me take a look my matlab code below to debug?
Thank you very much!!
clc
clear
syms psi_m(y) psi_m(x) lamda_m psi(x,y) s_sqar
psi(x,y)=psi_m(y)*sin(lamda_m*x)-psi_m(x)*sin(lamda_m*y)
delta_psi(x,y)=diff(psi(x,y),x,2)+diff(psi(x,y),y,2)
ode=delta_psi(x,y)-s_sqar*psi(x,y)==0
psi_mSol(x)=dsolve(ode)
  2 Comments
Walter Roberson
Walter Roberson on 28 May 2022
I do not think you can have the same function with two different variables
Torsten
Torsten on 29 May 2022
psi_m (x) = sinh(k_m*x)
is not a solution of the differential equation
psi_m''(x) + (lambda_m^2+s^2)*psi_m(x) = 0,
but of the differential equation
psi_m''(x) - (lambda_m^2+s^2)*psi_m(x) = 0
if k_m is set to
k_m = sqrt(lambda_m^2+s^2)

Sign in to comment.

Answers (0)

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!