What does it mean? (ODE solution)
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
John D'Errico
el 10 de Jun. de 2020
Editada: John D'Errico
el 10 de Jun. de 2020
@ 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.
Respuestas (1)
John D'Errico
el 10 de Jun. de 2020
Editada: John D'Errico
el 10 de Jun. de 2020
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.
0 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!