¿Cómo puedo hacer el campo de direcciones y resolver el PVI y(0)=1 de la siguiente EDO dy/dx=e^(-0.01xy^2)?

yprima = @(x,y)exp(-0.01*x*y^2);
[x, y] = meshgrid(-10:1:10,-10:1:10);
u = ones(size(x));
v = yprima(x, y);
quiver(x, y, u, v);
syms x y(x)
eqn = diff(y,x) == exp(-0.01*x*y^2);
cond = y(0) == 1;
sol = dsolve(eqn,cond);
Warning: Unable to find symbolic solution.
hold on
fplot(sol,[-10 10]);
Intenté graficar la curva solución de la EDO, pero me sigue arrojando esta advertencia y no sé como corregirlo Warning: Unable to find symbolic solution.
Agradecería que alguien me pudiera ayudar a despejar esta duda, por lo que soy nuevo usando este programa.

1 Comment

Google translation:
I tried to graph the solution curve of the ODE, but it keeps giving me this warning and I don't know how to correct it: Warning: Unable to find symbolic solution.
I would appreciate if someone could help me clear up this doubt, as I am new to using this program.

Sign in to comment.

 Accepted Answer

The message means that MATLAB cannot find an analytical solution to your differential equation. You will have to use ode45 to get a numerical solution instead.
El mensaje significa que MATLAB no puede encontrar una solución analítica para su ecuación diferencial. Tendrás que usar ode45 para obtener una solución numérica.
f = @(x,y)exp(-0.01*x*y^2);
xspan = [0 10];
y0 = 1;
[X,Y] = ode45(f,xspan,y0);
plot(X,Y)
grid on

More Answers (0)

Categories

Asked:

on 8 Oct 2023

Edited:

on 8 Oct 2023

Community Treasure Hunt

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

Start Hunting!