MATLAB Answers

How to solve the differential equation numerically

212 views (last 30 days)
Saurav on 6 Jun 2020
Commented: Asvin Kumar on 9 Jun 2020
My equation is this:
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?


Show 2 older comments
Saurav on 9 Jun 2020
ode(t) =
Vs(t)/500 + (1450710983537555*diff(Vs(t), t))/2417851639229258349412352 - 7/250 == (6207659398485333*Vs(t)*(Vs(t)/1000 + (1450710983537555*diff(Vs(t), t))/4835703278458516698824704 - 7/500))/858993459200000 - (3*Vs(t)^2)/25000 - (16209935408597048091837219925467*diff(Vs(t), t))/4153837486827862102824397063376076800000 - (54013508714495997*Vs(t))/4294967296000000000 - (22817324449185183*(Vs(t)/1000 + (1450710983537555*diff(Vs(t), t))/4835703278458516698824704 - 7/500)^2)/209715200000 + 391082542104575979/2147483648000000000
Saurav on 9 Jun 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 on 9 Jun 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 under "Types of ODEs" near the top

Sign in to comment.

Accepted Answer

Asvin Kumar
Asvin Kumar on 9 Jun 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


Saurav on 9 Jun 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 on 9 Jun 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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!