필터 지우기
필터 지우기

how can i solve a non-linear ode by ode45 or similar orders in matlab?

조회 수: 2 (최근 30일)
xosro
xosro 2017년 8월 19일
편집: xosro 2017년 8월 21일
I have the following equation, but i cannot employ ode45 order to solve the equation.
y-(x/2)*y' - a*y''/2*(1-b*y'')^2=0
where a, b are constant and positive.
  댓글 수: 4
John D'Errico
John D'Errico 2017년 8월 19일
It makes no sense unless y is a function of x here, as x was never mentioned otherwise.
xosro
xosro 2017년 8월 19일
I'm sorry. yes, y is function of x.

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

답변 (1개)

John D'Errico
John D'Errico 2017년 8월 19일
편집: John D'Errico 2017년 8월 19일
You won't be able to pose this as a problem for an ODE solver, since any standard ODE solver will require a finite domain over which to integrate. It is a boundary value problem anyway, so you will want to use a bvp solver. Tools like bvp4c use collocation, but you don't really care how they work, at least in terms of gaining a solution. I do think it highly unlikely that you will get an analytical solution, so you will need to provide explicit values for a and b.
So I'd first transform the problem into one with a finite domain. Thus, perhaps define a transformation that will map the infinite domain of x into a finite one. My first choice would be to use a tangent transformation.
x = tan(u)
So x lives on [-inf,inf]. But u lives on [-pi/2,pi/2].
Now, rewrite the ODE in terms of
z(u) = y(x(u))
We have y'=dy/dx. But what is dz/du? Chain rule gives us that.
dz/du = dy/dx*dx/du
And since x=tan(u), we know that dx/du=sec^2(u). Therefore we have
dy/dx = dz/du * (1/sec^2(u)) = dz/du * cos^2(u)
With a little effort, y'' should be doable too. So re-write the ODE in terms of z and u, substituting for x, y, y', y'' wherever they appear.
The boundary values will be unchanged.
z(-pi/2) = c
z(pi/2) = c
So, if you can solve the transformed boundary value problem over the new domain, that will be sufficient. If you don't like that choice of transformation, I'm sure there are others that would be viable. For example, an inverse logistic form would probably work, or you could use an erfinv transformation. The tangent transformation seems a very natural one here though.
Use one of the bvp solver tools. Although I have no experience with these solvers, it looks like bvp4c is designed to solve a general two point boundary value problem using collocation, so I'd start there. At least, that is how I'd attack the problem.
  댓글 수: 1
xosro
xosro 2017년 8월 21일
편집: xosro 2017년 8월 21일
bvp4c or similar orders solve explicit bvp. how can i use them for implicit bvp? As the problem is an implicit bvp.

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

카테고리

Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by