How to find an explicit function when using Runge-Kutta or one of the pertinent codes in Matlab (ode45)

7 次查看(过去 30 天)
Dear scholars,
I have a question which is almost trivial, but I like to make a shot for this;
I need an explicit answer function. On the other hand, Runge-Kutta, DQM, any other numerical methods or even the available codes like ode23, 45; all give us the numerical values of the pertinent function. But, I need explicit function in temporal domain, since I need to take derivative and apply other algebraic operations for further findings and survey.
Any ideas?

回答(1 个)

James Tursa
James Tursa 2020-4-6
编辑:James Tursa 2020-4-6
  3 个评论
Alireza Babaei
Alireza Babaei 2020-4-7
编辑:Alireza Babaei 2020-4-7
James,
Here is the code I have tried including the nonlinear equation, I have
clc
clear all
close all
syms t y(t)
c = 7.5;
m = 25;
k = 10;
IC1 = 0;
IC2 = 2;
eq = diff(y(t),t,2) + (c/m) * diff(y,t,1) + (k/m) * y + 0.0065*y(t)^3
%dsolve(eq == 0, y(0) == 0, subs(diff(y),t,0) == 1)
an1 = dsolve(eq == 0, [y(0) == IC1, subs(diff(y),t,0) == IC2])
ezplot(an1)
grid on

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by