Make a direction field for the differential equation

212 visualizaciones (últimos 30 días)
Bob
Bob el 23 de Jul. de 2016
Respondida: Om Prakash Yadav el 25 de Nov. de 2021
Make a direction field for the differential equation: y' =( t + y + 1)/ (y − t ). In a comment, talk about where existence and uniqueness break down for this equation. Does your slope field appear to corroborate this? Where there’s a problem, does it appear like existence fails or uniqueness?
Attempted code:
% The solution is unique at y(0)=1
[T, Y] = meshgrid(-2:0.2:2, -2:0.2:2);
S = -T.+ Y + 1/Y-T;
L = sqrt(1 + S.^2);
quiver(T, Y, 1./L, S./L, 0.45)
axis tight; xlabel('t'), ylabel('y')
title('Direction field for dy/dt = -t/y')

Respuestas (2)

Om Prakash Yadav
Om Prakash Yadav el 25 de Nov. de 2021
Actually, you have written expressions incorrectly,
[T, Y] = meshgrid(-2:0.2:2, -2:0.2:2);
S =( -T + Y + 1)./(Y-T);
L = sqrt(1 + S.^2);
quiver(T, Y, 1./L, S./L, 0.45)
axis tight; xlabel('t'), ylabel('y')
title('Direction field for dy/dt = -t/y')

Nahid Farabi
Nahid Farabi el 28 de Feb. de 2020
% The solution is unique at y(0)=1
[T, Y] = meshgrid(-2:0.2:2, -2:0.2:2);
S = -T.+ Y + 1/Y-T;
L = sqrt(1 + S.^2);
quiver(T, Y, 1./L, S./L, 0.45)
axis tight; xlabel('t'), ylabel('y')
title('Direction field for dy/dt = -t/y')

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by