필터 지우기
필터 지우기

What does it mean? (ODE solution)

조회 수: 2 (최근 30일)
Fahmy Shandy
Fahmy Shandy 2020년 6월 9일
편집: John D'Errico 2020년 6월 10일
Can you explain to me, why was the output like that?
I mean, since the input is ODE, the output should contains C1 (constant). And mine looks like it's a matrix form. Can you help me to solve this ODE?
Or, does this ODE have no solution?
Thanks!
  댓글 수: 4
madhan ravi
madhan ravi 2020년 6월 10일
what does
which dsolve -all % show?
John D'Errico
John D'Errico 2020년 6월 10일
편집: John D'Errico 2020년 6월 10일
@ Umar farooq Mohammad:
You tried to solve the wrong differential equation. Read the question more carefully. Admittedly, you needed to scroll the page to see the entire problem.

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

답변 (1개)

John D'Errico
John D'Errico 2020년 6월 10일
편집: John D'Errico 2020년 6월 10일
It seems the people who tried to respond to your question did not read it carefully, trying to solve the wrong ODE, or thinking you were using the wrong ODE solver, or that you had written your own code.
syms y(x)
>> ode = diff(y,x)== (3*y - 7*x + 7)/(3*x - 7*y - 3)
ode(x) =
diff(y(x), x) == -(3*y(x) - 7*x + 7)/(7*y(x) - 3*x + 3)
Now what happens when we try to solve this problem uing dsolve? First, I would add that you did not provide any initial conditions, so we would expect to see a constant of integration in there. Typically we would expect a 1-dimensional family of infinitely many solutions, parameterized by an unknown constant of integration.
sol = dsolve(ode)
Warning: Unable to find explicit solution. Returning implicit solution instead.
> In dsolve (line 197)
sol =
x - 1
1 - x
MATLAB tells us it was unable to find an explicit solution. So it did what it could, then telling you it was unable to truly "solve" the problem. However, do the "solution"s as given:
y = x - 1
and
y = 1 - x
satisfy the differential equation? Yes.
subs(ode,y,x-1)
ans(x) =
1 == 1
subs(ode,y,1-x)
ans(x) =
-1 == -1
In both cases, the answer is yes. So the solutions provided are solutions in a sense, and while not a complete solution in the form you expected, at least they form a partial solution. It did warn you of exactly that.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by