Find intersection point between u(t) = t^2(t-1) and u = 10.

1 visualización (últimos 30 días)
Lam Phucnghi
Lam Phucnghi el 22 de Nov. de 2020
Comentada: Lam Phucnghi el 23 de Nov. de 2020
Hello, I did dsolve differential equation. But I don't know how to find intersection point values between Root differential equation and u = 10.
syms u(t)
ode = t*diff(u,t) == t^2 + 3*u
condition = u(2) == 4;
uSol(t) = dsolve(ode, condition)
ezplot(uSol)
hold on
grid on
% try to plot u == 10
t_ = 0:4;
plot(t_, ones(size(t_)) * 10)
How can I find intersection point values of uSol and u == 10?
Thank you!

Respuesta aceptada

Stephan
Stephan el 23 de Nov. de 2020
Editada: Stephan el 23 de Nov. de 2020
Simply use the function you calculated:
>> t_sol = vpasolve(uSol == 10,t)
ans =
2.5445115283879060011505370208062
- 0.77225576419395300057526851040312 + 1.8258281475484665736721861577551i
- 0.77225576419395300057526851040312 - 1.8258281475484665736721861577551i
I think you can withdraw the complex solutions and the result looks like in would work looking at the plot. Testing the solution:
>> test_sol = uSol(t_sol(1))
test_sol =
10.0

Más respuestas (0)

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!

Translated by