Najibeh Borhani

50 Reputation

4 Badges

4 years, 109 days

MaplePrimes Activity


These are questions asked by

Hi.

What wrong could be there with the color line?

restart:

with(plots):

equ1 := BesselJ(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4) + BesselY(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4):

equ2 := BesselJ(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4) + 5*BesselY(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4):

equ3 := BesselJ(sqrt(17)/2, 10*sqrt(t))/t^(1/4) + 5*BesselY(sqrt(17)/2, 10*sqrt(t))/t^(1/4):

tmax   := 30:
colors := ["Red", "Violet", "Blue"]:

p1 := plot([equ1, equ2, equ3], t = 0 .. tmax, labels = [t, T[2](t)], tickmarks = [0, 0], labelfont = [TIMES, ITALIC, 12], axes = boxed, color = colors):

ymin := min(op~(1, op~(2, op~(2, [plottools:-getdata(p1)])))):
ymax := max(op~(2, op~(2, op~(2, [plottools:-getdata(p1)])))):
dy   := 2*ymax:

legend1 := typeset(C[3] = 1, ` , `, C[4] = 1, ` , `, Omega^2 = 50):
legend2 := typeset(C[3] = 1, ` , `, C[4] = 5, ` , `, Omega^2 = 50):
legend3 := typeset(C[3] = 1, ` , `, C[4] = 5, ` , `, Omega^2 = 25):

p2 := seq(textplot([tmax-2, ymax-k*dy/20, legend||k], align=left), k=1..3):

p3 := seq(plot([[tmax-2, ymax-k*dy/20], [tmax-1, ymax-k*dy/20]], color=colors[k]), k=1..3):
display(p1, p2, p3, view=[default, -ymax..ymax], size=[800, 500])

Error, (in plot) invalid color specification: colors[1]

 

display(p1, p2, p3, view = [default, -ymax .. ymax], size = [800, 500])

(1)

 

Download Legend_Inside.mw

Hi everyone, Could you help me to get a general solution to the following ode? Here rho and z are constants.

ODE := cos(g(t))^2*(diff(T(t), t, t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(g(t), t, t))*rho+2*(cos(g(t))^2)(diff(g(t), t))^2*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

cos(g(t))^2*(diff(diff(T(t), t), t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho+2*(cos(g(t)))(diff(g(t), t))^4*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

(1)

dsolve(ODE, T(t))

T(t) = DESol({-(-Omega^2*cos(g(t))^z+8*rho^2*(diff(g(t), t))^2*sin(g(t))^2-2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho-2*(cos(g(t)))(diff(g(t), t))^4*rho-2*rho*(diff(g(t), t))^2*sin(g(t))^2)*_Y(t)/cos(g(t))^2-3*rho*(diff(g(t), t))*sin(g(t))*(diff(_Y(t), t))/cos(g(t))+diff(diff(_Y(t), t), t)}, {_Y(t)})

(2)

NULL


Thanks.

Download ode_rlmt.mw

Could you help me to convert the following maple solution expressed by the hypergeom function to the LegendreP and Q function?

diff(T[3](t), t, t)+3*(diff(a(t), t))*(diff(T[3](t), t))/a(t)+(2*(diff(a(t), t, t))/a(t)+6*(diff(a(t), t))^2/a(t)^2+(-Omega^2+6)/a(t)^2)*T[3](t)

diff(diff(T[3](t), t), t)+3*(diff(a(t), t))*(diff(T[3](t), t))/a(t)+(2*(diff(diff(a(t), t), t))/a(t)+6*(diff(a(t), t))^2/a(t)^2+(-Omega^2+6)/a(t)^2)*T[3](t)

(1)

"a(t) :=Zeta*(1-(1-t/(Zeta^()))^(2))^(1/(2)) "

proc (t) options operator, arrow, function_assign; Zeta*(1-(1-t/Zeta)^2)^(1/2) end proc

(2)

ODE2 := diff(T[3](t), t, t)+3*(diff(a(t), t))*(diff(T[3](t), t))/a(t)+(2*(diff(a(t), t, t))/a(t)+6*(diff(a(t), t))^2/a(t)^2+(-Omega^2+6)/a(t)^2)*T[3](t)

diff(diff(T[3](t), t), t)+3*(1-t/Zeta)*(diff(T[3](t), t))/((1-(1-t/Zeta)^2)*Zeta)+(2*(-(1-t/Zeta)^2/((1-(1-t/Zeta)^2)^(3/2)*Zeta)-1/((1-(1-t/Zeta)^2)^(1/2)*Zeta))/(Zeta*(1-(1-t/Zeta)^2)^(1/2))+6*(1-t/Zeta)^2/((1-(1-t/Zeta)^2)^2*Zeta^2)+(-Omega^2+6)/(Zeta^2*(1-(1-t/Zeta)^2)))*T[3](t)

(3)

generalsol := dsolve(ODE2, T[3](t))

T[3](t) = _C1*hypergeom([1/2+(-Omega^2+1)^(1/2), 1/2-(-Omega^2+1)^(1/2)], [1-((1/2)*I)*15^(1/2)], (1/2)*t/Zeta)*t^(-((1/4)*I)*15^(1/2)-1/4)*(2*Zeta-t)^(((1/4)*I)*15^(1/2)-1/4)+_C2*(-(-2*Zeta+t)*t)^(((1/4)*I)*15^(1/2)-1/4)*hypergeom([((1/2)*I)*15^(1/2)+1/2+(-Omega^2+1)^(1/2), ((1/2)*I)*15^(1/2)+1/2-(-Omega^2+1)^(1/2)], [1+((1/2)*I)*15^(1/2)], (1/2)*t/Zeta)

(4)

convert(_C1*hypergeom([1/2+sqrt(-Omega^2+1), 1/2-sqrt(-Omega^2+1)], [1-I*sqrt(15)*(1/2)], t/(2*Zeta))*t^(-I*sqrt(15)*(1/4)-1/4)*(2*Zeta-t)^(I*sqrt(15)*(1/4)-1/4), LegendreP)

_C1*GAMMA(1-((1/2)*I)*15^(1/2))*(-t/Zeta)^(((1/4)*I)*15^(1/2))*LegendreP(-1/2+(-Omega^2+1)^(1/2), ((1/2)*I)*15^(1/2), 1-t/Zeta)*t^(-((1/4)*I)*15^(1/2)-1/4)*(2*Zeta-t)^(((1/4)*I)*15^(1/2)-1/4)/((2*Zeta-t)/Zeta)^(((1/4)*I)*15^(1/2))

(5)

convert(_C2*(-t*(t-2*Zeta))^(I*sqrt(15)*(1/4)-1/4)*hypergeom([I*sqrt(15)*(1/2)+1/2+sqrt(-Omega^2+1), I*sqrt(15)*(1/2)+1/2-sqrt(-Omega^2+1)], [1+I*sqrt(15)*(1/2)], t/(2*Zeta)), LegendreQ)

_C2*(-t*(-2*Zeta+t))^(((1/4)*I)*15^(1/2)-1/4)*hypergeom([((1/2)*I)*15^(1/2)+1/2+(-Omega^2+1)^(1/2), ((1/2)*I)*15^(1/2)+1/2-(-Omega^2+1)^(1/2)], [1+((1/2)*I)*15^(1/2)], (1/2)*t/Zeta)

(6)

NULL

Download solve3.mw

Like this

Thank you.

Could you help me to get the general solution in this way?

ODE2 := diff(T[1](t), t, t)+2*(diff(T[1](t), t))/t+(Omega^2/(a[i]^2*t^(4/3))-20/(9*t^2))*T[1](t)

diff(diff(T[1](t), t), t)+2*(diff(T[1](t), t))/t+(Omega^2/(a[i]^2*t^(4/3))-(20/9)/t^2)*T[1](t)

(1)

generalsol := dsolve(ODE2, T[1](t))

T[1](t) = _C1*BesselJ((1/2)*89^(1/2), 3*Omega*t^(1/3)/a[i])/t^(1/2)+_C2*BesselY((1/2)*89^(1/2), 3*Omega*t^(1/3)/a[i])/t^(1/2)

(2)

``

NULL

Download general_solve.mw

Thanks

How we can locate legend inside the plot like the one in the picture

equ1 := BesselJ(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4) + BesselY(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4)
equ2 := BesselJ(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4) + 5*BesselY(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4)
equ3 := BesselJ(sqrt(17)/2, 10*sqrt(t))/t^(1/4) + 5*BesselY(sqrt(17)/2, 10*sqrt(t))/t^(1/4)
plot([equ1, equ2, equ3], t = 0 .. 30, labels = [t, T[2](t)], tickmarks = [0, 0], labelfont = [TIMES, ITALIC, 12], axes = boxed, color = ["Red", "Violet", "Blue"])
C[3] = 1, C[4] = 1, Omega^2 = 50
C[3] = 1, C[4] = 5, Omega^2 = 50
C[3] = 1, C[4] = 5, Omega^2 = 25

 

Thank you!

Page 1 of 1