mmcdara

4887 Reputation

17 Badges

7 years, 2 days

MaplePrimes Activity


These are replies submitted by mmcdara

https://www.mapleprimes.com/questions/236509-How-Do-I-Solve-This-One.

As I'm in a good mood today, here's a solution

# A maple expression

PutMeInTheBox = `#mrow(msubsup(mo("Σ"),mrow(mi("k"),mo("=120")),mo("1300")),mo("i",mathcolor="white"),msup(mrow(mo("("),mo("2"),mo("i",mathcolor="white"),mi("x-k"),mo(")")),mi("k")))`

PutMeInTheBox = `#mrow(msubsup(mo("Σ"),mrow(mi("k"),mo("=120")),mo("1300")),mo("i",mathcolor="white"),msup(mrow(mo("("),mo("2"),mo("i",mathcolor="white"),mi("x-k"),mo(")")),mi("k")))`

(1)

 

NULL

Download Maple_expression.mw

Can't you provide a Maple code for us to see what you are capable of and then guide you towards the solution?
The formulation of your question sounds like "do my homework, I don't want to bother with it".

@KIRAN SAJJAN 

Could you explain more precisely what you want because your last worksheet doesn't contain any error and your request is not clear (at least for me).
I imagine M is the Mach number, Cf is the friction coefficient and Nu is the Nusselt number, aren't they?
Do you mean that you want to plot , for instance, aNusselt number defined by 

(-a4-Rd)*diff(T(Y), Y)

for different values of the Mach number?

Could it be this:
 

NULL

restart; with(plots)

PDEtools[declare]((F, T, G, H)(Y), prime = Y):

F(Y)*`will now be displayed as`*F

 

T(Y)*`will now be displayed as`*T

 

G(Y)*`will now be displayed as`*G

 

H(Y)*`will now be displayed as`*H

 

`derivatives with respect to`*Y*`of functions of one variable will now be displayed with '`

(1)

p1 := 0.1e-1:

rf := 1050:

sigma1 := 25000:

sigma2 := 0.210e-5:

sigma3 := 6.30*10^7:

sigma4 := 10^(-10):

sigma5 := 1.69*10^7:

sigma6 := 4.10*10^7:

``

S1 := .5:

alp := 2:

``

``

B1 := 1+2.5*p+6.2*p^2:

a1 := B1*p1+B2*p2+B3*p3:

a2 := 1-p1-p2-p3+p1*rs1/rf+p2*rs2/rf+p3*rs3/rf:

a3 := 1-p1-p2-p3+p1*rs1*cps1/(rf*cpf)+p2*r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b[3]+Y^2*b[2]+Y*b[1]+b[0])+64.1780496*Y^5*b[7]+45.8414640*Y^4*b[6]+30.5609760*Y^3*b[5]+18.3365856*Y^2*b[4]+9.1682928*Y*b[3]+5.678333332*Y^6*b[7]+4.867142856*Y^5*b[6]+4.055952380*Y^4*b[5]+3.244761904*Y^3*b[4]+2.433571428*Y^2*b[3]+0.5e-1*d[0]-0.5e-1*b[0]+.8111904760*b[1]+3.0560976*b[2]+.8111904760*c[0]-0.5e-1*b[5]*Y^5-0.5e-1*b[6]*Y^6-0.5e-1*b[7]*Y^7+.8111904760*c[1]*Y+.8111904760*c[2]*Y^2+.8111904760*c[3]*Y^3+.8111904760*c[4]*Y^4+.8111904760*c[5]*Y^5+.8111904760*c[6]*Y^6+.8111904760*c[7]*Y^7+0.5e-1*d[1]*Y+0.5e-1*d[2]*Y^2+0.5e-1*d[3]*Y^3+0.5e-1*d[4]*Y^4-0.5e-1*b[1]*Y-0.5e-1*b[2]*Y^2-0.5e-1*b[3]*Y^3-0.5e-1*b[4]*Y^4 = 0

(3)

T := (a4+Rd)*(diff(Theta, `$`(Y, 2)))+a3*Pr*Ra*(diff(Theta, Y))+Q*Theta+Pr*alp*S*bett*(Theta-Phi)+Pr*Ec*((1+1/bet)*a1*(diff(W, Y))^2+a5*M*W^2+(1+1/bet)*a1*S1*W^2+S2*W^3+S*betu*(W-U)) = 0;

8.022256200*(Y^7*b[7]+Y^6*b[6]+Y^5*b[5]+Y^4*b[4]+Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^2-.525*d[0]-2.10*h[0]+.525*b[0]+2.20*c[0]+10.23967791*c[1]+2.266560888*c[2]+.525*b[5]*Y^5+.525*b[6]*Y^6+.525*b[7]*Y^7+2.20*c[1]*Y+2.20*c[2]*Y^2+2.20*c[3]*Y^3+2.20*c[4]*Y^4+2.20*c[5]*Y^5+2.20*c[6]*Y^6+2.20*c[7]*Y^7-.525*d[1]*Y-.525*d[2]*Y^2-.525*d[3]*Y^3-.525*d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BCS := (D(W))(0) = 0, (D(Theta))(0) = 0, W(1) = -delta*(1+1/bet)*(D(W))(1), Theta(1) = 1+g*(D(Theta))(1), U(1) = -delta*(1+1/bet)*(D(W))(1), Phi(1) = 1+g*(D(Theta))(1):

W     := unapply(W, Y);Theta := unapply(Theta, Y);
U     := unapply(U, Y);Phi   := unapply(Phi, Y);
F     := unapply(F, Y);T     := unapply(T, Y);
G     := unapply(G, Y);H     := unapply(H, Y);



 

proc (Y) options operator, arrow; Y^7*b[7]+Y^6*b[6]+Y^5*b[5]+Y^4*b[4]+Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0] end proc

 

proc (Y) options operator, arrow; Y^7*c[7]+Y^6*c[6]+Y^5*c[5]+Y^4*c[4]+Y^3*c[3]+Y^2*c[2]+Y*c[1]+c[0] end proc

 

proc (Y) options operator, arrow; Y^4*d[4]+Y^3*d[3]+Y^2*d[2]+Y*d[1]+d[0] end proc

 

proc (Y) options operator, arrow; Y^4*h[4]+Y^3*h[3]+Y^2*h[2]+Y*h[1]+h[0] end proc

 

proc (Y) options operator, arrow; 1+0.5e-1*d[0]-0.5e-1*b[0]+.8111904760*b[1]+3.0560976*b[2]+.8111904760*c[0]-.5*(Y^7*b[7]+Y^6*b[6]+Y^5*b[5]+Y^4*b[4]+Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^2-0.5e-1*Y^7*b[7]-0.5e-1*Y^6*b[6]-0.5e-1*Y^5*b[5]-0.5e-1*Y^4*b[4]-0.5e-1*Y^3*b[3]-0.5e-1*Y^2*b[2]-0.5e-1*Y*b[1]+.8111904760*Y^7*c[7]+.8111904760*Y^6*c[6]+.8111904760*Y^5*c[5]+.8111904760*Y^4*c[4]+.8111904760*Y^3*c[3]+.8111904760*Y^2*c[2]+.8111904760*Y*c[1]+0.5e-1*Y^4*d[4]+0.5e-1*Y^3*d[3]+0.5e-1*Y^2*d[2]+0.5e-1*Y*d[1]+1.622380952*Y*b[2]-1.296703274*M*(Y^7*b[7]+Y^6*b[6]+Y^5*b[5]+Y^4*b[4]+Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])+64.1780496*Y^5*b[7]+45.8414640*Y^4*b[6]+30.5609760*Y^3*b[5]+18.3365856*Y^2*b[4]+9.1682928*Y*b[3]+5.678333332*Y^6*b[7]+4.867142856*Y^5*b[6]+4.055952380*Y^4*b[5]+3.244761904*Y^3*b[4]+2.433571428*Y^2*b[3] = 0 end proc

 

proc (Y) options operator, arrow; -.525*d[0]-2.10*h[0]+.525*b[0]+2.20*c[0]+10.23967791*c[1]+2.266560888*c[2]+8.022256200*(Y^7*b[7]+Y^6*b[6]+Y^5*b[5]+Y^4*b[4]+Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^2+16.04451240*(7*Y^6*b[7]+6*Y^5*b[6]+5*Y^4*b[5]+4*Y^3*b[4]+3*Y^2*b[3]+2*Y*b[2]+b[1])^2+5.25*(Y^7*b[7]+Y^6*b[6]+Y^5*b[5]+Y^4*b[4]+Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^3+13.61538438*M*(Y^7*b[7]+Y^6*b[6]+Y^5*b[5]+Y^4*b[4]+Y^3*b[3]+Y^2*b[2]+Y*b[1]+b[0])^2+47.59777865*Y^5*c[7]+33.99841332*Y^4*c[6]+22.66560888*Y^3*c[5]+13.59936533*Y^2*c[4]+6.799682664*Y*c[3]+71.67774537*Y^6*c[7]+61.43806746*Y^5*c[6]+51.19838955*Y^4*c[5]+40.95871164*Y^3*c[4]+30.71903373*Y^2*c[3]+20.47935582*Y*c[2]+.525*Y^7*b[7]+.525*Y^6*b[6]+.525*Y^5*b[5]+.525*Y^4*b[4]+.525*Y^3*b[3]+.525*Y^2*b[2]+.525*Y*b[1]+2.20*Y^7*c[7]+2.20*Y^6*c[6]+2.20*Y^5*c[5]+2.20*Y^4*c[4]+2.20*Y^3*c[3]+2.20*Y^2*c[2]+2.20*Y*c[1]-.525*Y^4*d[4]-.525*Y^3*d[3]-.525*Y^2*d[2]-.525*Y*d[1]-2.10*Y^4*h[4]-2.10*Y^3*h[3]-2.10*Y^2*h[2]-2.10*Y*h[1] = 0 end proc

 

proc (Y) options operator, arrow; 2.0*Y^3*d[4]+1.5*Y^2*d[3]+1.0*Y*d[2]+.5*d[1]+.5*Y^7*b[7]+.5*Y^6*b[6]+.5*Y^5*b[5]+.5*Y^4*b[4]-.5*Y^4*d[4]+.5*Y^3*b[3]-.5*Y^3*d[3]+.5*Y^2*b[2]-.5*Y^2*d[2]+.5*Y*b[1]-.5*Y*d[1]+.5*b[0]-.5*d[0] = 0 end proc

 

proc (Y) options operator, arrow; 2.0*Y^3*h[4]+1.5*Y^2*h[3]+1.0*Y*h[2]+.5*h[1]+.5*Y^7*c[7]+.5*Y^6*c[6]+.5*Y^5*c[5]+.5*Y^4*c[4]-.5*Y^4*h[4]+.5*Y^3*c[3]-.5*Y^3*h[3]+.5*Y^2*c[2]-.5*Y^2*h[2]+.5*Y*c[1]-.5*Y*h[1]+.5*c[0]-.5*h[0] = 0 end proc

(7)

 

z1 := (D(W))(0) = 0:

z2 := W(1) = -delta*(1+1/bet)*(D(W))(1):

z3 := (D(Theta))(0) = 0:

``

z4 := Theta(1) = 1+g*(D(Theta))(1):

 

z5 := U(1) = -delta*(1+1/bet)*(D(W))(1):

``

z6 := Phi(1) = 1+g*(D(Theta))(1):

z7 := F(0):

z8 := F(1):

``

z9 := (D(F))(0):

z10 := (D(F))(1):

z11 := (D(D(F)))(0):

z12 := (D(D(F)))(1):

``

z13 := T(0):

z14 := T(1):

z15 := (D(T))(0):

z16 := (D(T))(1):

z17 := (D(D(T)))(0):

z18 := (D(D(T)))(1):

z19 := G(0):

z20 := G(1):

z21 := H(0):

z22 := H(1):

z23 := (D(G))(0):

z24 := (D(G))(1):

z25 := (D(H))(0):

z26 := (D(H))(1):

``

NULL

NULL

``

Zs :=  [z1, z2, z3, z4, z5, z6, z7, z8, z9, z10, z11, z12, z13, z14,z15, z16,z17,z18,z19,z20,z21, z22, z23, z24,z25, z26]:
print~(Zs):

b[1] = 0

 

b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0] = -0.14e-1*b[7]-0.12e-1*b[6]-0.10e-1*b[5]-0.8e-2*b[4]-0.6e-2*b[3]-0.4e-2*b[2]-0.2e-2*b[1]

 

c[1] = 0

 

c[7]+c[6]+c[5]+c[4]+c[3]+c[2]+c[1]+c[0] = 1+.7*c[7]+.6*c[6]+.5*c[5]+.4*c[4]+.3*c[3]+.2*c[2]+.1*c[1]

 

d[4]+d[3]+d[2]+d[1]+d[0] = -0.14e-1*b[7]-0.12e-1*b[6]-0.10e-1*b[5]-0.8e-2*b[4]-0.6e-2*b[3]-0.4e-2*b[2]-0.2e-2*b[1]

 

h[4]+h[3]+h[2]+h[1]+h[0] = 1+.7*c[7]+.6*c[6]+.5*c[5]+.4*c[4]+.3*c[3]+.2*c[2]+.1*c[1]

 

1.+0.5e-1*d[0]-0.5e-1*b[0]+.8111904760*b[1]+3.0560976*b[2]+.8111904760*c[0]-.5*b[0]^2-1.296703274*M*b[0] = 0

 

1+0.5e-1*d[0]+0.5e-1*d[1]+0.5e-1*d[2]+0.5e-1*d[3]+0.5e-1*d[4]-0.5e-1*b[0]+.7611904760*b[1]+4.628478552*b[2]+11.55186423*b[3]+21.53134750*b[4]+34.56692838*b[5]+50.65860686*b[6]+69.80638293*b[7]+.8111904760*c[0]+.8111904760*c[1]+.8111904760*c[2]+.8111904760*c[3]+.8111904760*c[4]+.8111904760*c[5]+.8111904760*c[6]+.8111904760*c[7]-1.296703274*M*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])-.5*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])^2 = 0

 

0.5e-1*d[1]-0.5e-1*b[1]+1.622380952*b[2]+9.1682928*b[3]+.8111904760*c[1]-1.296703274*M*b[1]-1.0*b[0]*b[1] = 0

 

0.5e-1*d[1]+.10*d[2]+.15*d[3]+.20*d[4]-0.5e-1*b[1]+1.522380952*b[2]+13.88543566*b[3]+46.20745691*b[4]+107.6567375*b[5]+207.4015703*b[6]+354.6102480*b[7]+.8111904760*c[1]+1.622380952*c[2]+2.433571428*c[3]+3.244761904*c[4]+4.055952380*c[5]+4.867142856*c[6]+5.678333332*c[7]-1.296703274*M*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])-1.0*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1]) = 0

 

.10*d[2]-.10*b[2]+4.867142856*b[3]+36.6731712*b[4]+1.622380952*c[2]-2.0*b[0]*b[2]-2.593406548*M*b[2]-1.0*b[1]^2 = 0

 

.10*d[2]+.30*d[3]+.60*d[4]-.10*b[2]+4.567142856*b[3]+55.54174262*b[4]+231.0372846*b[5]+645.9404251*b[6]+1451.810992*b[7]+1.622380952*c[2]+4.867142856*c[3]+9.734285712*c[4]+16.22380952*c[5]+24.33571428*c[6]+34.06999999*c[7]-1.0*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])^2-1.0*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])*(42*b[7]+30*b[6]+20*b[5]+12*b[4]+6*b[3]+2*b[2])-1.296703274*M*(42*b[7]+30*b[6]+20*b[5]+12*b[4]+6*b[3]+2*b[2]) = 0

 

-.525*d[0]-2.10*h[0]+.525*b[0]+2.20*c[0]+10.23967791*c[1]+2.266560888*c[2]+8.022256200*b[0]^2+16.04451240*b[1]^2+5.25*b[0]^3+13.61538438*M*b[0]^2 = 0

 

-2.10*h[4]-.525*d[0]-.525*d[1]-.525*d[2]-.525*d[3]-.525*d[4]-2.10*h[0]-2.10*h[1]-2.10*h[2]-2.10*h[3]+.525*b[0]+.525*b[1]+.525*b[2]+.525*b[3]+.525*b[4]+.525*b[5]+.525*b[6]+.525*b[7]+2.20*c[0]+12.43967791*c[1]+24.94591671*c[2]+39.71871639*c[3]+56.75807697*c[4]+76.06399843*c[5]+97.63648078*c[6]+121.4755240*c[7]+5.25*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])^3+13.61538438*M*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])^2+16.04451240*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])^2+8.022256200*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])^2 = 0

 

-.525*d[1]-2.10*h[1]+.525*b[1]+2.20*c[1]+20.47935582*c[2]+6.799682664*c[3]+15.75*b[0]^2*b[1]+64.17804960*b[1]*b[2]+27.23076876*M*b[0]*b[1]+16.04451240*b[0]*b[1] = 0

 

-8.40*h[4]-.525*d[1]-1.050*d[2]-1.575*d[3]-2.100*d[4]-2.10*h[1]-4.20*h[2]-6.30*h[3]+.525*b[1]+1.050*b[2]+1.575*b[3]+2.100*b[4]+2.625*b[5]+3.150*b[6]+3.675*b[7]+2.20*c[1]+24.87935582*c[2]+74.83775012*c[3]+158.8748656*c[4]+283.7903848*c[5]+456.3839906*c[6]+683.4553654*c[7]+32.08902480*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])*(42*b[7]+30*b[6]+20*b[5]+12*b[4]+6*b[3]+2*b[2])+15.75*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])^2*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])+27.23076876*M*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])+16.04451240*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1]) = 0

 

-1.050*d[2]-4.20*h[2]+1.050*b[2]+4.40*c[2]+61.43806746*c[3]+27.19873066*c[4]+128.3560992*b[2]^2+192.5341488*b[1]*b[3]+31.50*b[0]^2*b[2]+27.23076876*M*b[1]^2+31.50*b[0]*b[1]^2+54.46153752*M*b[0]*b[2]+32.08902480*b[0]*b[2]+16.04451240*b[1]^2 = 0

 

32.08902480*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])*(210*b[7]+120*b[6]+60*b[5]+24*b[4]+6*b[3])+15.75*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])^2*(42*b[7]+30*b[6]+20*b[5]+12*b[4]+6*b[3]+2*b[2])+27.23076876*M*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])^2+31.50*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])^2-25.20*h[4]-1.050*d[2]-3.150*d[3]-6.300*d[4]-4.20*h[2]-12.60*h[3]+1.050*b[2]+3.150*b[3]+6.300*b[4]+10.500*b[5]+15.750*b[6]+22.050*b[7]+4.40*c[2]+74.63806746*c[3]+299.3510005*c[4]+794.3743279*c[5]+1702.742309*c[6]+3194.687934*c[7]+32.08902480*(42*b[7]+30*b[6]+20*b[5]+12*b[4]+6*b[3]+2*b[2])^2+27.23076876*M*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])*(42*b[7]+30*b[6]+20*b[5]+12*b[4]+6*b[3]+2*b[2])+16.04451240*(7*b[7]+6*b[6]+5*b[5]+4*b[4]+3*b[3]+2*b[2]+b[1])^2+16.04451240*(b[7]+b[6]+b[5]+b[4]+b[3]+b[2]+b[1]+b[0])*(42*b[7]+30*b[6]+20*b[5]+12*b[4]+6*b[3]+2*b[2]) = 0

 

.5*d[1]+.5*b[0]-.5*d[0] = 0

 

1.5*d[4]+1.0*d[3]+.5*d[2]+.5*b[7]+.5*b[6]+.5*b[5]+.5*b[4]+.5*b[3]+.5*b[2]+.5*b[1]+.5*b[0]-.5*d[0] = 0

 

.5*h[1]+.5*c[0]-.5*h[0] = 0

 

1.5*h[4]+1.0*h[3]+.5*h[2]+.5*c[7]+.5*c[6]+.5*c[5]+.5*c[4]+.5*c[3]+.5*c[2]+.5*c[1]+.5*c[0]-.5*h[0] = 0

 

1.0*d[2]+.5*b[1]-.5*d[1] = 0

 

4.0*d[4]+1.5*d[3]+3.5*b[7]+3.0*b[6]+2.5*b[5]+2.0*b[4]+1.5*b[3]+1.0*b[2]+.5*b[1]-.5*d[1] = 0

 

1.0*h[2]+.5*c[1]-.5*h[1] = 0

 

4.0*h[4]+1.5*h[3]+3.5*c[7]+3.0*c[6]+2.5*c[5]+2.0*c[4]+1.5*c[3]+1.0*c[2]+.5*c[1]-.5*h[1] = 0

(8)

IZs := indets(Zs) minus {M};

numelems(Zs), numelems(IZs);

{b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], d[0], d[1], d[2], d[3], d[4], h[0], h[1], h[2], h[3], h[4]}

 

26, 26

(9)

Zsol := proc(Ma) fsolve(eval(Zs, M=Ma)) end proc:

# example

Zsol(1)

{b[0] = .4528477725, b[1] = 0., b[2] = -.5456992938, b[3] = 0.9787892139e-1, b[4] = 0.5392589969e-1, b[5] = -.1004469452, b[6] = 0.5280749340e-1, b[7] = -0.9643936946e-2, c[0] = 1.688266264, c[1] = 0., c[2] = -2.715762558, c[3] = 8.023205965, c[4] = -18.19126343, c[5] = 22.70336190, c[6] = -13.86047069, c[7] = 3.251216625, d[0] = .2118383626, d[1] = -.2410094099, d[2] = -.1205047050, d[3] = .1233638336, d[4] = 0.2798182974e-1, h[0] = 1.242893264, h[1] = -.4453730000, h[2] = -.2226865000, h[3] = .4041352773, h[4] = -0.8041495798e-1}

(10)

F := proc(Y, Ma) eval(sum(b[i]*Y^i,i=0..7), Zsol(Ma)) end proc:
T := proc(Y, Ma) eval(sum(c[i]*Y^i,i=0..7), Zsol(Ma)) end proc:
G := proc(Y, Ma) eval(sum(d[i]*Y^i,i=0..4), Zsol(Ma)) end proc:
H := proc(Y, Ma) eval(sum(h[i]*Y^i,i=0..4), Zsol(Ma)) end proc:

plot([seq(F(Y, Ma), Ma = 1 .. 3)], Y = 0 .. 1, axes = boxed, color = [red, green, blue], legend = `~`[cat]("M=", [`$`(1 .. 3)]), thickness = 2, labels = [Y, W])

 

plot([seq(T(Y, Ma), Ma = 1 .. 3)], Y = 0 .. 1, axes = boxed, color = [red, green, blue], legend = `~`[cat]("M=", [`$`(1 .. 3)]), thickness = 2, labels = [Y, T])

 

NULL

-1.275852823

(11)

NULL

1.149666788

(12)

``

Cf := 'Cf':
Nu := 'Nu':

plot(
  [seq(a1*(1+1/bet)*diff(F(Y, Ma), Y), Ma = 1 .. 3)]
  , Y=0..1
  , color=[red, green, blue]
  , legend = `~`[cat]("M=", [`$`(1 .. 3)])
  , labels=[Y, "Cf"]
);

print():
plot(
  [seq((-a4-Rd)*diff(T(Y, Ma), Y), Ma = 1 .. 3)]
  , Y=0..1
  , color=[red, green, blue]
  , legend = `~`[cat]("M=", [`$`(1 .. 3)])
  , labels=[Y, "Nu"]
)

 

 

 

NULL

 

 

 

 

``


 

Download AGM-2_mmcdara_1.mw

@ogunmiloro 

Ok.

Your model can be summarized as 

diff(G[dp](T), T) = psi[1]*F[d](T)+psi[2]*L[d](T)+psi[3]*E[c](T)-delta[3]*G[dp](T)
=
diff(G[dp](T), T) = F(T)-delta[3]*G[dp](T);

where
F(T) = psi[1]*F[d](T)+psi[2]*L[d](T)+psi[3]*E[c](T)

You say that F[d], L[d] and E[c] are indeed functions of time.
Let's assume that a correct fitting is such that psi[1], psi[2], psi[3], F[d](T), L[d](T) and E[c](T) get these values

psi[1] = p[1], psi[2] = p[2], psi[3] = p[3], F[d](T)=A(T), L[d](T)=B(T), E[c](T)=C(T)

Thus this solution is such that 

p[1]*A(T) + p[2]*B(T) + p[3]*C(T)

and any 6-uple 

(psi[1], psi[2], psi[3], F[d](T), L[d](T), E[c](T) )

which verifies 

psi[1]*F[d](T)+psi[2]*L[d](T)+psi[3]*E[c](T) = p[1]*A(T) + p[2]*B(T) + p[3]*C(T)

gives an exacyly as good fit than 

psi[1] = p[1], psi[2] = p[2], psi[3] = p[3], F[d](T)=A(T), L[d](T)=B(T), E[c](T)=C(T)

Thus your parameters are not identifiable.

If F[d], L[d] and E[c] arr known functions of time the problem remains the same: if F[d], L[d] and E[c] are not linearly independent there is an infinity of triples (psi[1], psi[2], psi[3]) which give exactly fit, meaning the psi are not identifiable.
Can you give the expressions of F[d], L[d] and E[c]? Or at least there values at the different years?

More of this you said nothing about the initial condition on G[dp](T)


Please enlighten us

  • What does (for instance) year 2022 = 3, 023, 744. 14 mean?
    Are 3 quantities collected each year... or only one (GDP) and do you use commas to separate thousands?
  • So, what are the data?
  • What do you mean by "Fit the following model to the data" ?
    Do you mean "solve the ode
    diff(G[dp](T), T) = psi[1]*F[d](T)+psi[2]*L[d](T)+psi[3]*E[c](T)-delta[3]*G[dp](T);
    for some initial condition
    • Which one?  
      G[dp](some_unknown_date) = 1023744 ?
    • What about the parameters 
      delta[3] = .19, psi[1] = .63, psi[2] = .84, psi[3] = .72
      
      Are these the values to use in the previous ode?
      Or are there only indicative values (initial values) of these four parameters you aimed to assess through some minimization procedure?
    • Are F[d], L[d] andE[c] functions of time or constants?
       

Perhaps you think that the people you're asking for help just have to muddle through your draft, and that any effort on your part is superfluous?

@vv 

Your last remark is interesting.
There are no characters with more than 2 bytes in French (more precisely I didn't find any), that is why I asked @erik10 to check my procedure.

PS: I've just browsed the link you provided and voted for your answer.


... that you try to solve a system of 7 equations in only 4 unknowns?


Errors:

  1. What do you expect to do writting f[i] = f[i+1] ? (= instead of := ???)
  2. Your loop is unterminated (end do is missing, see the help pages to write a loop correctly).
  3. What is n in 
    f[i+2] := (2/11)*n[i-1]-(9/11)*n[i]+(12/11)*f[i]+(6/11)*m[i+2]

    Did you wanted to write m instead?
    While n is undefined it's impossible to get the expected results you present.
     

Fix all these points and come again if you still get errors.

@AHSAN 

Isn't the error message clear enough for you not to be able to work out where the error comes from?

Error, (in plots:-display) expecting plot structure but received: contplot

means: "plots:-display expect a plotting command (plot, plot2d, spacecirve, pointplot, PLOT, matrixplot, dataplot, contourplot, ...) but received contplot".
Is contplot a plotting function? Browse the help pages to check that.

One of two things:

  1. You did a typo writting contplot instead of contourplot (do the changing to verify that noerre is generated).
     
  2. Or... you followed my advice, went to https://www.mapleprimes.com/posts/210159-2D-Contour-Plot-And-Legend
    but didn't read what  @acer  wrote and jumped jump straight away to what you wanted without even wondering if the preceding code was necessary or not.
    Read again  @acer's  post: you will see that he begins building the procedure contplot , perhaps you should copy it into your worksheet before using it?

@AHSAN 

You want to plot numeric values don't you? So you must ignore line 1 od the data matrix, which 2..-1 does.
If you want to plot colimn 2 versus colum 1, selecting them thanks to [1, 2] does the job.
Finally data[2..-1, [1, 2]] means "all the rows of data but the first one and columns 1 and 2 (in this order!).

PS: I have updated my answer

@AHSAN 

Why didn't you start from the last file I sent you?
It's much closer than what you want to axhive (multiple plots) than the frist one was?

Here are some answers to to your questions: read it carefully to understandwhy you got errors and avoid reproducing them in the future.

Download Errors_explained_.mw

Your last file customized:

restart:

N := (-18*sqrt(2)*(M-(4/3)*r)*(x^2+2)^2*arctan((1/2)*x*sqrt(2))-9*Pi*(M*r-4/3)*(x^2+2)^2*sqrt(2)+(-36*M+48)*x^3+(-120*M+96)*x)/(4*(x^2+2)^2)

(1/4)*(-18*2^(1/2)*(M-(4/3)*r)*(x^2+2)^2*arctan((1/2)*x*2^(1/2))-9*Pi*(M*r-4/3)*(x^2+2)^2*2^(1/2)+(-36*M+48)*x^3+(-120*M+96)*x)/(x^2+2)^2

(1)

Func := proc(MM, col, sty)
plot(
  [eval(N, MM)]
  , x = -5 .. 5
  , labels = ["x", "N"]
  , axes = boxed
  , labeldirections = ["horizontal", "horizontal"]
  , colour = col
  , linestyle = sty
  , gridlines = false
 ):
end proc:

Vline := (x, eps) -> plot([[x, ymin-eps], [x, ymax+eps]], color=black):
Hline := y -> plot([[-5, y], [5, y]], color=black):

Legends := proc(Ms, Cols, Stys, Left, Right, eps, yleg0, gap)
local n, k, yleg, legs:
n    := numelems(Ms):
legs := NULL:
for k from 1 to n do
  yleg := yleg0 + (k-1)*gap;
  legs := legs,
          plots:-display(
            plot(yleg, x=Left..Left+1, color=Cols[k], linestyle=Stys[k])
            , plots:-textplot([Left+1, yleg, cat("M=", sprintf("%1.4f", eval(M, Ms[k])))], align=right)

          ):
 end do:
 legs := legs, plottools:-rectangle([Left-0.1, yleg0-2*eps], [Right, yleg0+gap*n], color=white)
end proc:

 

params := {
            [M=1.3015, r=0.1],
            [M=1.2812, r=0.1],
            [M=1.2605, r=0.1],
            [M=1.2108, r=0.1],
            [M=1.1523, r=0.1]
          }:

Cols  := [black, red, blue, green, purple]:
Stys  := [solid, longdash, spacedash, dash, dashdot]:
Left  := -4.8:
Right := -1.5:
eps   := 0.4:
yleg0 := ymin+2:
gap   := 1:

p := [ seq(Func(params[k], Cols[k], Stys[k]), k=1..numelems(params)) ]:

g := plottools:-getdata~(p):
map(t -> (min, max)(t[3][.., 2]), g):
ymin, ymax := (min, max)(%):

plots:-display(
  p[]
  , Vline(0, 0)
  #, Hline(0)
  , Legends(params, Cols, Stys, Left, Right, eps, yleg0, gap)
  , gridlines=true
  , title=cat("N = ", 1, ", r = ", sprintf("%1.1f", eval(r, params[1])))
);
 

 

 

 

Download Customized.mw

@Jean-Michel 

Hi, 
I've always felt as you do, that Mapleprimes is not the place to submit homework and expect that someone else will solve it for you.
I've even said this to some OPs, but saw that other contributors had less scruples, not to mention the criticism some have addressed to me. Which is not an excuse to play the same game, I agree.

See you soon, time for bed.

@AHSAN 

If uou want to draw a vertical line at position x=Ajust write

Vline := plot([[A, ymin-eps], [A, ymax+eps]], color=black):

Note that the eps is used here in order that the graph doesn't tangent the upper and lower box.

If you want display N legends, here is a way (customize the parameters as you want):

restart:

N := (-18*sqrt(2)*(M-4/3)*(x^2+2)^2*arctan((1/2)*x*sqrt(2))-9*Pi*(M-4/3)*(x^2+2)^2*sqrt(2)+(-36*M+48)*x^3+(-120*M+96)*x)/(4*(x^2+2)^2)

(1/4)*(-18*2^(1/2)*(M-4/3)*(x^2+2)^2*arctan((1/2)*x*2^(1/2))-9*Pi*(M-4/3)*(x^2+2)^2*2^(1/2)+(-36*M+48)*x^3+(-120*M+96)*x)/(x^2+2)^2

(1)

Func := proc(MM, col, sty)
plot(
  [subs(M = MM, N)]
  , x = -5 .. 5
  , labels = ["x", "N"]
  , axes = boxed
  , labeldirections = ["horizontal", "horizontal"]
  , colour = col
  , linestyle = sty
  , gridlines = false
 ):
end proc:

Vline := (x, eps) -> plot([[x, ymin-eps], [x, ymax+eps]], color=black):
Hline := y -> plot([[-5, y], [5, y]], color=black):

Legends := proc(Ms, Cols, Stys, Left, Right, eps, yleg0, gap)
local n, k, yleg, legs:
n    := numelems(Ms):
legs := NULL:
for k from 1 to n do
  yleg := yleg0 + (k-1)*gap;
  legs := legs,
          plots:-display(
            plot(yleg, x=Left..Left+1, color=Cols[k], linestyle=Stys[k])
            , plots:-textplot([Left+1, yleg, cat(" N=1, M=", sprintf("%1.4f", Ms[k]))], align=right)

          ):
 end do:
 legs := legs, plottools:-rectangle([Left-0.1, yleg0-2*eps], [Right, yleg0+(2*eps+gap)*(n-1)-eps], color=white)
end proc:

Ms    := [1.2, 1.3015, 1.4]:
Cols  := ["red", "green", "blue"]:
Stys  := [1, 3, 1]:
Left  := -4.8:
Right := -0.2:
eps   := 0.1:
yleg0 := ymin+0.3:
gap   := 0.4:

p := [ seq(Func(Ms[k], Cols[k], Stys[k]), k=1..3) ]:

ymin, ymax := (min, max)(seq((min, max)(plottools:-getdata(p[k])[3][.., 2]), k=1..3));

 

plots:-display(
  p[]
  , Vline(0, 0)
  , Hline(0)
  , Legends(Ms, Cols, Stys, Left, Right, eps, yleg0, gap)
);

 

 

-3.01379677260103396, 2.55529587632053135

 

 

 

Download Customize_as_you_want.mw

Are you aware that the ball is located below the surface?
I understand that given the positive value of the gravity the ball, without initial velocity, will go upward to the surface, but it seems a little bit weird.
More of this it would be better if you provide the differential equation of the movement, including the value of the coefficient of restitution.

A suggestion: browse the POSTS tab: some time ago someone published post about a bouncing ball over a 2D random curve.
Unfortunately I can put a finger on it but you could already see here https://maple.cloud/app/5151696808312832/Bouncing+Ball

@Rouben Rostamian  

Thanks, but it was merely a suggestion for you to improve your answer, not a proper answer from me (the final graph should be rotated by -Pi/2 but the text does not follow).
So I'm a bit confused, especially considering that the real good idea (switching to polar coordinates) is yours.

I vote up in return to balance your action.

1 2 3 4 5 6 7 Last Page 1 of 107