DimaBrt

100 Reputation

4 Badges

6 years, 343 days

MaplePrimes Activity


These are questions asked by DimaBrt

Hello. There is some system of differential equations with respect to the unknowns u1(x), u2(x), u3(x) with boundary conditions. Solved numerically using the dsolve command.
Is it possible to build a graph of a function of the form W=a*u1(x)+b*u2(x)+c*u3(x) based on this solution?

Thank you for your answers.

Hello. I want to organize some parameter
F=fsolve(1+x^2=j).

If j=-5, for example, an empty value 'F=' will be returned. How can I write the expression

If F=(void), then action 1, else action 2 end if

The fact is that I just don't know how to write the result (void), that is, the result of 'F ='

Thanks

Hello. Please help me. I need to calculate the integral (3). This integral has many singular points at which there is convergence in the sense of the principal Cauchy value. The Maple integral itself does not count. I don't understand how to find automatically all the singular points on the integration area. Then, perhaps, it would be possible to split the integral into the sum of integrals by regions, as I roughly wrote in the picture. I want to automate this process, because in fact it is necessary to calculate many integrals of the form (4), where f(x,y) are arbitrary functions that can oscillate strongly, so I don't want to write banal quadrature formulas. I would like to use the means of Maple, since the accuracy will be greater and faster, but we need to somehow bypass the special points. I will be glad of any help. Thank you very much


restart

r1 := 1:

1/1000000

(1)

F1 := 1/(Zp*sqrt(k^2-x^2)*sin(y)+omega*rho1);

1/(46715093.93*(-x^2+1)^(1/2)*sin(y)+1485000)

(2)

Int(F1, x = -k+epsilon .. k-epsilon, y = 0 .. 2*Pi);

Int(1/(46715093.93*(-x^2+1)^(1/2)*sin(y)+1485000), x = -999999/1000000 .. 999999/1000000, y = 0 .. 2*Pi)

(3)

F2 := F1*f(x, y);

f(x, y)/(46715093.93*(-x^2+1)^(1/2)*sin(y)+1485000)

(4)

``

Download Integrate.mw

Hello. Please help me solve the ODE system

ODU_v2.mw
 

restart

with(linalg):

r1 := 1:

1

 

0.1111110000e-2

 

0

 

1920.000000+0.7407400000e-3*I

(1)

J := proc (n, x) options operator, arrow; BesselJ(n, x) end proc:

nsize := floor(2*k)+1;

3

(2)

n := 1; A1 := matrix([[(lambda(r)+2*mu(r))*r^2, 0], [0, mu(r)*r^2]]); B1 := matrix([[(diff(lambda(r), r)+2*(diff(mu(r), r)))*r^2+(lambda(r)+2*mu(r))*r, I*n*(lambda(r)+mu(r))*r], [I*n*(lambda(r)+mu(r))*r, (diff(mu(r), r))*r^2+mu(r)*r]]); C1 := matrix([[(diff(lambda(r), r))*r-lambda(r)-(n^2+2)*mu(r)+omega^2*rho(r)*r^2, I*n*((diff(lambda(r), r))*r-lambda(r)-3*mu(r))], [I*n*((diff(mu(r), r))*r+lambda(r)+3*mu(r)), -(diff(mu(r), r))*r-n^2*lambda(r)-(2*n^2+1)*mu(r)+omega^2*rho(r)*r^2]]); U := vector([U1(r), U2(r)]); DU := vector([diff(U1(r), r), diff(U2(r), r)]); D2U := vector([diff(U1(r), `$`(r, 2)), diff(U2(r), `$`(r, 2))]); T1 := multiply(A1, D2U); T2 := multiply(B1, DU); T3 := multiply(C1, U); prav := evalm(T1+T2+T3); pr1 := prav[1]; pr2 := prav[2]; p1 := evalc(Re(pr1)); p2 := evalc(Im(pr1)); p3 := evalc(Re(pr2)); p4 := evalc(Im(pr2)); WWVV := evalf(subs(x = k*r1, H(n, x)))*evalf(subs(x = k2*r1, H(n, x)))*n^2-evalf(subs(x = k*r1, DH(n, x)))*evalf(subs(x = k2*r1, DH(n, x)))*k*k2*r1^2; `αv1` := I*evalf(subs(x = k2*r1, DH(n, x)))*k2*omega*r1^2/WWVV; `αv2` := -evalf(subs(x = k2*r1, H(n, x)))*n*omega*r1/WWVV; `αv3` := (evalf(subs(x = k*r1, DJ(n, x)))*evalf(subs(x = k2*r1, DH(n, x)))*I^n*k*k2*r1^2-I^n*n^2*evalf(subs(x = k*r1, J(n, x)))*evalf(subs(x = k2*r1, H(n, x))))/WWVV; `αv4` := evalf(subs(x = k*r1, H(n, x)))*r1*n*omega/WWVV; `αv5` := -I*evalf(subs(x = k*r1, DH(n, x)))*r1^2*k*omega/WWVV; `αv6` := I*I^n*n*k*r1*(evalf(subs(x = k*r1, DJ(n, x)))*evalf(subs(x = k*r1, H(n, x)))-evalf(subs(x = k*r1, DH(n, x)))*evalf(subs(x = k*r1, J(n, x))))/WWVV; gv1 := rho1*(-evalf(subs(x = k*r1, D2H(n, x)))*k^2*r^2*(4*nu+3*xi)-3*evalf(subs(x = k*r1, DH(n, x)))*k*r1*xi+evalf(subs(x = k*r1, H(n, x)))*(-4*k^2*r1^2*nu-3*k^2*r1^2*xi+(3*I)*omega*r1^2-2*n^2*nu+3*n^2*xi))/(3*r1^2); gv2 := (6*rho1/(3*r1^2)*I)*n*nu*(evalf(subs(x = k2*r1, H(n, x)))-k2*r1*evalf(subs(x = k2*r1, DH(n, x)))); gv3 := rho1*(-I^n*evalf(subs(x = k*r1, D2J(n, x)))*k*r1^2*(4*nu+3*xi)+I^n*evalf(subs(x = k*r1, DJ(n, x)))*k*r1*(2*nu-3*xi)+I^n*evalf(subs(x = k*r1, J(n, x)))*(-4*k^2*r1^2*nu-3*k^2*r1^2*xi+(3*I)*omega*r1^2-2*n^2*nu+3*n^2*xi))/(3*r1^2); gv4 := (2*nu*rho1/r1^2*I)*n*(evalf(subs(x = k*r1, H(n, x)))-evalf(subs(x = k*r1, DH(n, x)))*k*r1); gv5 := nu*rho1*(evalf(subs(x = k2*r1, D2H(n, x)))*k2^2*r1^2-evalf(subs(x = k2*r1, D2H(n, x)))*k2*r1+evalf(subs(x = k2*r1, H(n, x)))*n^2)/r1^2; gv6 := (2*nu*rho1/r1^2*I)*n*I^n*(evalf(subs(x = k*r1, J(n, x)))-k*r1*evalf(subs(x = k*r1, DJ(n, x)))); E := matrix([[`αv1`*gv1+`αv4`*gv2+lambda(r1)/r1, `αv2`*gv1+`αv4`*gv2+I*n*lambda(r1)/r1], [`αv1`*gv4+`αv4`*gv5+I*n*mu(r1)/r1, `αv2`*gv4+`αv5`*gv5-mu(r1)/r1]]); G := vector([-gv1*`αv3`-gv2*`αv6`-gv3, -gv4*`αv3`-gv5*`αv6`-gv6]); e1 := (lambda2*n^2*evalf(subs(x = kl*r2, J(n, x)))-kl^2*r2^2*evalf(subs(x = kl*r2, D2J(n, x)))*(lambda2+2*mu2)-kl*lambda2*r2*evalf(subs(x = kl*r2, DJ(n, x))))/r2^2; e2 := (2*mu2*I)*n*(evalf(subs(x = kt*r2, J(n, x)))-kt*r2*evalf(subs(x = kt*r2, DJ(n, x))))/r2^2; e3 := (I*n*2)*(evalf(subs(x = kl*r2, J(n, x)))-kl*r2*evalf(subs(x = kl*r2, DJ(n, x))))/r2^2; e4 := (kt^2*r2^2*evalf(subs(x = kt*r2, D2J(n, x)))-kt*r2*evalf(subs(x = kt*r2, DJ(n, x)))+n^2*evalf(subs(x = kt*r2, J(n, x))))/r2^2; gamma1 := kt*r2*evalf(subs(x = kt*r2, DJ(n, x)))/WW; gamma2 := I*n*evalf(subs(x = kt*r2, J(n, x)))/WW; gamma3 := I*n*evalf(subs(x = kl*r2, J(n, x)))/WW; gamma4 := -kl*r2*evalf(subs(x = kl*r2, DJ(n, x)))/WW; WW := (kl*r2^2*evalf(subs(x = kl*r2, DJ(n, x)))*kt*evalf(subs(x = kt*r2, DJ(n, x)))-n^2*evalf(subs(x = kl*r2, J(n, x)))*evalf(subs(x = kt*r2, J(n, x))))/r2; F := matrix([[r2^2*(gamma1*e1+gamma3*e2+lambda(r2)/r2), r2^2*(gamma2*e1+gamma4*e2+I*n*lambda(r2)/r2)], [mu2*r2^2*(gamma1*e3+gamma3*e4+I*n*mu(r2)/(mu2*r2)), mu2*r2^2*(gamma2*e3+gamma4*e4-mu(r2)/(mu2*r2))]]); Ur1 := vector([U1(r1), U2(r1)]); Ur2 := vector([U1(r2), U2(r2)]); DUr1 := vector([Dx1(r1)+I*Dy1(r1), Dx2(r1)+I*Dy2(r1)]); DUr2 := vector([Dx1(r2)+I*Dy1(r2), Dx2(r2)+I*Dy2(r2)]); CCR1 := multiply(A1, DUr1); CCR2 := multiply(E, Ur1); CR := evalm(CCR1+CCR2); CCR11 := multiply(A1, DUr2); CCR22 := multiply(F, Ur2); CR2 := evalm(CCR11+CCR22); ggr1 := expand(evalc(Re(CR[1]))); ggr2 := expand(evalc(Im(CR[1]))); ggr3 := expand(evalc(Re(CR[2]))); ggr4 := expand(evalc(Im(CR[2]))); ggr5 := expand(evalc(Re(CR2[1]))); ggr6 := expand(evalc(Im(CR2[1]))); ggr7 := evalc(Re(CR2[2])); ggr8 := evalc(Im(CR2[2])); gr1 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr1); gr2 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr2); gr3 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr3); gr4 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr4); gr5 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr5); gr6 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr6); gr7 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr7); gr8 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr8); sys := p1 = 0, p2 = 0, p3 = 0, p4 = 0; Inits := gr3 = evalc(Re(G[2])), gr4 = evalc(Im(G[2])), gr1 = evalc(Re(G[1])), gr2 = evalc(Im(G[1])), gr5 = 0, gr6 = 0, gr7 = 0, gr8 = 0; dde := dsolve({Inits, sys}, numeric, [x1(r), x2(r), y1(r), y2(r)], method = bvp[trapdefer], 'maxmesh' = 5000)

1

 

5860000000.*r^2*(diff(diff(x1(r), r), r))+5860000000.*r*(diff(x1(r), r))-4880000000.*r*(diff(y2(r), r))+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*x1(r)-(15217.76256*r^3-10652.43379*r^2)*y1(r)+6840000000.*y2(r) = 0, 5860000000.*r^2*(diff(diff(y1(r), r), r))+5860000000.*r*(diff(y1(r), r))+4880000000.*r*(diff(x2(r), r))+(15217.76256*r^3-10652.43379*r^2)*x1(r)+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*y1(r)-6840000000.*x2(r) = 0, 980000000.0*r^2*(diff(diff(x2(r), r), r))-4880000000.*r*(diff(y1(r), r))+980000000.0*r*(diff(x2(r), r))-6840000000.*y1(r)+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*x2(r)-(15217.76256*r^3-10652.43379*r^2)*y2(r) = 0, 980000000.0*r^2*(diff(diff(y2(r), r), r))+4880000000.*r*(diff(x1(r), r))+980000000.0*r*(diff(y2(r), r))+6840000000.*x1(r)+(15217.76256*r^3-10652.43379*r^2)*x2(r)+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*y2(r) = 0

 

980000000.0*(D(x2))(1)-3407670.437*x1(1)-979699593.0*y1(1)-982493864.9*x2(1)+2501551.625*y2(1) = -1147.143928, 980000000.0*(D(y2))(1)+979699593.0*x1(1)-3407670.437*y1(1)-2501551.625*x2(1)-982493864.9*y2(1) = 522.0509891, 5860000000.*(D(x1))(1)+1012610130.*x1(1)+3433520814.*y1(1)-3395293.932*x2(1)-3899703885.*y2(1) = 1553476.957-0.8860949e-3*r^2, 5860000000.*(D(y1))(1)-3433520814.*x1(1)+1012610130.*y1(1)+3899703885.*x2(1)-3395293.932*y2(1) = 582234.6500+.6073438988*r^2, 3750400000.*(D(x1))(.8)-0.1805979289e11*x1(.8)-3057.354840*y1(.8)+182.8516896*x2(.8)+0.2220128109e11*y2(.8) = 0, 3750400000.*(D(y1))(.8)+3057.354840*x1(.8)-0.1805979289e11*y1(.8)-0.2220128109e11*x2(.8)+182.8516896*y2(.8) = 0, 627200000.0*(D(x2))(.8)-182.8520640*x1(.8)-0.2610528071e11*y1(.8)-0.2508771663e11*x2(.8)-607.0797125*y2(.8) = 0, 627200000.0*(D(y2))(.8)+0.2610528071e11*x1(.8)-182.8520640*y1(.8)+607.0797125*x2(.8)-0.2508771663e11*y2(.8) = 0

 

Error, (in dsolve/numeric/BVPSolve) unable to store '-HFloat(8.860193192958832e-4)+0.8860949e-3*r^2' when datatype=float[8]

 

``


 

Download ODU_v2.mw

 

Hello. Plotting a graph in the polar coordinate system using polar plot (example). Is it possible to make it display 90 degrees instead of Pi/2, 45 degrees instead of Pi/4, and so on. Thanks

1 2 3 4 Page 1 of 4