Help with fsolve command, in solving system of equations acquired by spectral collocation.

조회 수: 4 (최근 30일)
Hi,
I am solving a coupled system of equations using spectral collocation scheme,
u''+a1*t=a2;
t''=0;
with b.c
u=0,t=0.5 at y=0;
u=0,t=1 at y=1;
The set of equations at (N+1) collocation points will be described as:
D2*U+a1*T=a2;
D2*T=0;
with
U_0 = 0, T_0=1
U_N = 0, T_N=0.5
where
D2 is the differentiation matrix of order(N+1), given by D2=D*D
U and T are the vectors of unknowns
a1=30;
a2=-12;
with given boundary conditions, how can solve the set of algebraic equations in MATLAB?
Can it be solved using "fsolve"?
As I do now know how to express the vectores U and T in the code.
  댓글 수: 2
Priya M
Priya M 2021년 10월 6일
Hi...Im priya...also doing Spectral collocation technique in my research...i have some doubts...can you please help me how to give an input in MATLAB.
my mail id :priya.jeni28@gmail.com
Ehab Elsayed
Ehab Elsayed 2021년 11월 18일
@Tanya Sharma Hi... Im Ehab, i run your program Tanya and solve the set of algebraic equations in MATLAB? using "solve (F)" we get the solution for N=3 only but no solution for N>3 why???? My email ehab_math@yahoo.com

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2021년 1월 28일
You are mixing notations it looks like to me. D*U would be used more for working with Laplace transforms. In the space you are working in, which is not the laplace space, you do not use multiplication notation and you cannot treat D like a variable to be solved for, and cannot use fsolve.
I would suggest that you use the symbolic toolbox and dsolve().
  댓글 수: 8
Tanya Sharma
Tanya Sharma 2021년 1월 30일
Thanks. I am able to create the system of equations (tanya1.m).
I applied to boundary condition as well.
Now how to solve them using fsolve?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Equation Solving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by