# Question:shaded area in plot and 95% confidence intervals

## Question:shaded area in plot and 95% confidence intervals

Maple

Hello,

I am trying to get a shaded area in my plot but I could not.

First we solve ODE without randomness:

ode := diff(U(t), t) = -(A+B*U(t))*U(t);

Then we add randomness to ODE and solve:

ode2 := diff(U(t), t) = -(A+r(t)+B*U(t))*U(t);

A with randomness for r in R=( - 0.0001/365, 0.0001/365) is:

A(t,r)= A+r

Where A is constant =  0.0001/365

We plot both solution. For the plot I suppose to have a plot with shaded area that indicate the range of the 95% confidence intervals between highest and lowest simulation result at each time interval. I do not see a shaded are in my plote.

In:

`R := RandomTools:-Generate(distribution(Normal(-0.2e-1, 0.4e-1)),100,confidence=0.95, makeproc = true);`
`is confidence=0.95 give me  95% confidence intervals between highest and lowest simulation result ?`
`is 100 will do 100 run?`

Maple code:

`> restart;> with(DEtools); with(plots);> k := 0; A := 0.37e-1; B := 0.2e-6;> ode1 := diff(U(t), t) = -(A+B*U(t))*U(t);> ic[1] := U(365*k) = 1000;> sol[1] := dsolve({ode1, ic[1]}, U(t), range = 365*k .. 365*k+365, numeric);> p[1] := odeplot(sol[1], [[t, U(t)]], t = 365*k .. 365*k+365, colour = blue);> ode2 := diff(U(t), t) = -(A+r(t)+B*U(t))*U(t);> R := RandomTools:-Generate(distribution(Normal(-0.2e-1, 0.4e-1)),100,confidence=0.95, makeproc = true);`
`> r := proc (t) if not type(t, numeric) then return 'procname(args)' end if; R() end proc;> sol[2] := dsolve({ode2, ic[1]}, numeric, known = r(t), method = classical[foreuler], stepsize = 0.1e-1);> p[2] := odeplot(sol[2], [[t, U(t)]], t = 365*k .. 365*k+365, colour = red);> display(p[1], p[2]);`

Thank you.

Thank you to Preben Alsholm for the help with randomness part.

﻿