sipa

10 Reputation

One Badge

7 years, 85 days

MaplePrimes Activity


These are questions asked by sipa

multiple_parameters_-_sipa.mw 

 

@Carl Love please help me .. I tried solve a ode system of equation problem numerically with your code, using maple 15 but i get errors.

I dont know how to plot multiple solutions on one graph.

I want to vary one of the parameters....

e.g s1=0, s1=0.5, s1=1 where other parameters are kept constant

 

> restart;
> g := 1/7; alpha1 := .75; alpha2 = .5; `αv` := .3; xi := .4; `μv` := 1/30; mu1 := 0.434931506849e-4; mu2 := 0.410958904109e-4; `μh` := 1/(60*365); Nh := 10000; a := 1; Nv := 1000; s2 := .5; br := 4;
> A1 := diff(S0(t), t) = (1-s1)*mu1*Nh+(1-s2)*mu2*a-br*alpha1*S0(t)*V1(t)/Nh-`μh`*S0(t);
> A2 := diff(Z0(t), t) = xi*Z(t)-br*alpha2*Z0(t)*V1(t)/Nh-`μh`*Z0(t);
> A3 := diff(Iota(t), t) = br*alpha1*S0(t)*V1(t)/Nh-g*Iota(t)-`μh`*Iota(t);
> A4 := diff(Y(t), t) = br*alpha2*Z0(t)*V1(t)/Nh-g*Y(t)-`μh`*Y(t);
> A5 := diff(Z(t), t) = s1*mu1*Nh+s2*mu2*a+g*(Iota(t)+Y(t))-xi*Z(t)-`μh`*Z(t);
> A6 := diff(V0(t), t) = `μv`*Nv-br*`αv`*V0(t)*Iota(t)/Nh-`μv`*V0(t);
> A7 := diff(V1(t), t) = br*`αv`*V0(t)*Iota(t)/Nh-`μv`*V1(t);

> PD := unapply({A || (1 .. 7)}, s1);
> IBC := {S0(0) = 450, V0(0) = 100, V1(0) = 70, Y(0) = 50, Z(0) = 250, Z0(0) = 50, Iota(0) = 100};
> sList := [0, .6, 1]; Colours := table(`~`[`=`](sList, ["blue", "red", "green"])); for s1 in sList do pds := dsolve(PD(s1), IBC, numeric); Plots[s1] := pds:-plot[display](Iota(t), t = .5, linestyle = "solid", colour = Colours[s1], legend = sprintf("s1=%2.2f", s1), title = "Velocity Profile") end do;
Error, (in dsolve/numeric/process_input) invalid argument: {S0(0) = 450, V0(0) = 100, V1(0) = 70, Y(0) = 50, Z(0) = 250, Z0(0) = 50, Iota(0) = 100}


> plots:-display([seq(Plots[s1], `in`(s1, sList))]);
Error, (in plots:-display) expecting plot structures but received: [Plots[0], Plots[.6], Plots[1]]

Download multiple_parameters_-_sipa.mw

Page 1 of 1