How to solve the differential equation numerically

56 visualizaciones (últimos 30 días)
Saurav
Saurav el 6 de Jun. de 2020
Comentada: Asvin Kumar el 9 de Jun. de 2020
My equation is this:
(-Vs/500)-((6e-10)*diff(Vs,t))+(7/250)+(7.226*Vs*((Vs/1000)+((3e-10)*diff(Vs,t))-7/500)^2)-(3/25000)*(Vs^2)-((4.336e-9)*diff(Vs,t))-(0.014*Vs)-((1.08e5)*((Vs/1000)+((3e-10)*diff(Vs,t))-7/500))+0.2023=0
Vs(0)=7.9
I tried using dsolve but there is no explicit solution. I need solved vector with numerical values for Vs with constant rise in 't'.
Can anyone please help me?
  5 comentarios
Saurav
Saurav el 9 de Jun. de 2020
There is no explicit solution for this diff. eqtn. So I want to solve it numerically with constant step rise in t. I am new to matlab so I dont know how to implement it using ode45
J. Alex Lee
J. Alex Lee el 9 de Jun. de 2020
By "no explicit solution" I think you mean "no analytical solution".
If diff(Vs(t),t) means and that is the only differential term, your equation still looks "explicit in ", which means you can put your equation in the form
rather than how you have it. I'm not going to go through your equation term by term to verify, you should do so yourself.
Then, you should be able to follow Asvin's advice to look at examples of how to solve that class of problems using ode45.
If your problem is truly "implicit" in , then look at https://www.mathworks.com/help/matlab/math/choose-an-ode-solver.html under "Types of ODEs" near the top

Iniciar sesión para comentar.

Respuesta aceptada

Asvin Kumar
Asvin Kumar el 9 de Jun. de 2020
As others have mentioned in the comments, ODE seems best suited for this problem. Here’s an example from which you can adapt a solution. Solve a Nonstiff Equation using ode45
  2 comentarios
Saurav
Saurav el 9 de Jun. de 2020
yes but problem here is dy/dy is in quadratic form so there will be two solutions for dy/dt. I don't know how to implement it as I am new to matlab.Thank you so much.
Asvin Kumar
Asvin Kumar el 9 de Jun. de 2020
I see what you're talking about. ode15i is the recommended way to go about these problems. Have a look at this example on solving Weissinger Implicit ODE to get started. This should give you an idea of how you can use the function.

Iniciar sesión para comentar.

Más respuestas (1)

madhan ravi
madhan ravi el 9 de Jun. de 2020

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