Prev: Question about solver in Simscape
Next: How can I do set affinity for compiled MATLAB DLL, forcing DLL only uses certain CPUs?
From: Seth on 5 Aug 2010 11:38 Ok...my math skills are rusty and I need to solve an ODE. I can do this numerically with the ODE23s solver in Matlab, but am looking for a semi-analytical (symbolic) solution. Can anyone help? the ODE is as follows: dy/dt=G1(t)-G2(t)*y Note that I will obtain the time varying functions, G1(t) & G2(t) from experimental results (time series data). I do NOT have a functional form. However, I can numerically integrate or create series fits as necessary - thus expressing solutions as integral of G1(t) is ok... I also know y(t=0) as an initial condition. Any advice on how to get an analytical solution for y(t) would be very helpful! Thanks again!
From: Steven_Lord on 5 Aug 2010 11:59 "Seth" <Snick.NOSPAM(a)mathworks.com> wrote in message news:i3elss$qg5$1(a)fred.mathworks.com... > Ok...my math skills are rusty and I need to solve an ODE. I can do this > numerically with the ODE23s solver in Matlab, but am looking for a > semi-analytical (symbolic) solution. Can anyone help? > > the ODE is as follows: > > dy/dt=G1(t)-G2(t)*y > > Note that I will obtain the time varying functions, G1(t) & G2(t) from > experimental results (time series data). I do NOT have a functional form. > However, I can numerically integrate or create series fits as necessary - > thus expressing solutions as integral of G1(t) is ok... > > I also know y(t=0) as an initial condition. > > Any advice on how to get an analytical solution for y(t) would be very > helpful! Try DSOLVE from Symbolic Math Toolbox. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Seth on 5 Aug 2010 13:33 Steve, Thanks for the suggestion and I agree that would work well if my ODE had standard "non time varying" constants...but I am unsure how to solve the problem with DSOLVE when I don't know the functional form of the time varying constants apriori.
From: Torsten Hennig on 5 Aug 2010 22:28 > Ok...my math skills are rusty and I need to solve an > ODE. I can do this numerically with the ODE23s > solver in Matlab, but am looking for a > semi-analytical (symbolic) solution. Can anyone help? > > the ODE is as follows: > > dy/dt=G1(t)-G2(t)*y > > Note that I will obtain the time varying functions, > G1(t) & G2(t) from experimental results (time series > data). I do NOT have a functional form. However, I > can numerically integrate or create series fits as > necessary - thus expressing solutions as integral of > G1(t) is ok... > > I also know y(t=0) as an initial condition. > > Any advice on how to get an analytical solution for > y(t) would be very helpful! > > Thanks again! The solution for your equation is given in the paragraph 'Summary of general solutions', Differential Equation (4) under http://en.wikipedia.org/wiki/Linear_differential_equation Best wishes Torsten.
From: Seth on 6 Aug 2010 08:57
Torsten, I think you just saved me a lot of time & effort! This looks like exactly what I was looking for! Thanks you! -Seth |