Question: Integration using results of a sys of ODEs

Hi all,

I am doing some research where I solve three differential equations simultaneously.. The results are three optimal time paths, W(t), R(t), and H(t). I want to plug these three into an integral, and solve (to get the net present value of my initial problem). I have no problem solving the diff. equations and getting values, given initial conditions. I am getting an error in the integration. I know I am missing something in the way I set it up. Anyways, I am putting my steps here below. Thanks for taking a look!

Here are the differential equations:

Eq1:=diff(H(t),t)=-0.4e-4*W(T)+0.4e-4*R(t)+1.2

Eq2:=diff(W(t),t) = diff(R(t),t)-1741*exp(0.5e-2*t)+20.8*(diff(H(t),t))-0.5e-1*W(t)+9969-0.5e-1*R(t)-H(t)

Eq3:=diff(R(t),t)=(-.05*W(t)-3334+.05*R(t)+1742*exp(.005*t)+(diff(W(t),t)))/(1+.08 *R(t))

Here is the code for solving the system, with starting values:

sol1:=dsolve([Eq1, Eq2, Eq3, R(0) = 9200, H(0) = 4800, W(0) = 20800], numeric, method = rosenbrock)

Now, I want to solve this integration, from t=0..40:

int1:=(int (exp(.5e-1*t)*(-.5e-2*(W(t)+98400-R(t))^2-(410*(W(t)+98400-R(t)))*exp(.5e-2*t)-W(t)*(1070-.22*H(t)+.1e-4*W(t))-R(t)*(336+.85e-3*R(t)))),t=0..40)

I get this error:

Error, (in int) wrong number (or type) of arguments

I realize I need to tell it to take values from sol1, but I do not know exactly how to do this.

Any ideas, or where I can find this in the help would be much appreciated!

Thanks,

Steve



 

 

 

 

Is there a way for me to do this without plugging in the explicit results of the differential equation?

Please Wait...