vv

12453 Reputation

19 Badges

9 years, 285 days

MaplePrimes Activity


These are answers submitted by vv

For a solution given implicitely, as in this case, odetest may fail.

Actually the implicit solution is

Int( 1/(y^3 + 1)^(2/3), y) + Int( 1/(x^3 + 1)^(2/3), x) + c = 0;

Int(1/(y^3+1)^(2/3), y)+Int(1/(x^3+1)^(2/3), x)+c = 0

(1)

The problem is that the integrals are computed in terms of hypergeom, and Maple is not able to further manipulate.

f:=1/(x^3 + 1)^(2/3);

1/(x^3+1)^(2/3)

(2)

int(f, x)

x*hypergeom([1/3, 2/3], [4/3], -x^3)

(3)

Z:=diff(% ,x) - f; # Z should be 0

hypergeom([1/3, 2/3], [4/3], -x^3)-(1/2)*x^3*hypergeom([4/3, 5/3], [7/3], -x^3)-1/(x^3+1)^(2/3)

(4)

is(Z=0) assuming x>0, x<1;

FAIL

(5)

# It seems that any usual convertion fails here.

Salut Viorel, bine ai venit!

If you are interested in an approximate solution based on series, here it is:

restart;
ode:= diff(g(r),r$2)- r/R*g(r)=0;
ic:=g(2*R)=0, D[1](g)(0)=R;
dsolve([ode,ic],g(r)) assuming R>0;
G:=rhs(%);
Order:=6;
simplify(series(G, r=0));
convert(%, polynom):
g1:=convert(series(%, R=0), polynom);  
R:=1/3;  #############
dsol:=dsolve([ode,ic],g(r), numeric);
plots:-odeplot(dsol, r=0..2*R);
plot(g1, r=0..2*R);

So, for small R and r, an approximation is

RealDomains is not very reliable but it works in this case (Maple 2019).

eq:=(-2*cos(x)^2+2*sin(x+(1/4)*Pi)^2-1)/sqrt(-x^2+4*x) = 0:
RealDomain:-solve({-x^2+4*x > 0, eq}, {x}, allsolutions);
RealDomain:-solve(eq, {x}, allsolutions);

 

If you want a compact solution:

9*x-(1/3)*Pi = (-1)^k*(7*x-(1/3)*Pi) + k*Pi:
solve(%,x); # k in Z

I think that in a package where almost everything is a module, such a COMMAND could exist only if it is provided by the package itself.
But we can use:

X := ''RandomVariable''(Normal(mu, sigma)):
Y := eval(X, mu=1);

 

something like:

plots:-pointplot([x1,y1], color=[seq(COLOR(HUE,(t+1)/2),t=z1)]);

 

It is not that difficult but unfortunately Maple 2019 gives 0 for it.

It can be computed using residues. This must be done by hand because Maple cannot compute residues for essential singularities.

But it can compute the resulting sum, and the result is   2*Pi*BesselJ(m, b)*exp(I/2*m*Pi)

 

F1 := (x, y) -> 9/8*y + 9/8 - 21/8*y*exp(-2*x) - 21/8*exp(-x);

proc (x, y) options operator, arrow; (9/8)*y+9/8-(21/8)*y*exp(-2*x)-(21/8)*exp(-x) end proc

(1)

S1 := y -> fsolve(F1(x, y), x);

proc (y) options operator, arrow; fsolve(F1(x, y), x) end proc

(2)

S1(0.2);

.7548332751

(3)

g := (U,y) -> U + S1(2*y*exp(-U));

proc (U, y) options operator, arrow; U+S1(2*y*exp(-U)) end proc

(4)

g(0.6,0.2);

1.347716146

(5)

fsolve('g'(U,0.3) = 0.2, U);

-.4051840484

(6)

U1 := (x,y) -> fsolve('g(U,y) = x', U);

proc (x, y) options operator, arrow; fsolve('g(U, y) = x', U) end proc

(7)

U1(0.4,0.6);

-.1591368141

(8)

F2 := (x, y) -> 9/8*y + 9/8 - 21/8*y*exp(-2*x) - 21/8*exp(-x) + 3/4*int(F1(x - z, 2*y*exp(-z)), z = 0 .. U1(x,y));

proc (x, y) options operator, arrow; (9/8)*y+9/8-(21/8)*y*exp(-2*x)-(21/8)*exp(-x)+(3/4)*(int(F1(x-z, 2*y*exp(-z)), z = 0 .. U1(x, y))) end proc

(9)

F2(0.2,0.3);

-1.008550780

(10)

####################################################################

X:=[seq(k*0.1, k=0..10)];
Y:=[seq(k*0.1 ,k=0..10)];

[0., .1, .2, .3, .4, .5, .6, .7, .8, .9, 1.0]

 

[0., .1, .2, .3, .4, .5, .6, .7, .8, .9, 1.0]

(11)

F1_:= Interpolation:-SplineInterpolation( [X, Y],  [seq([seq(F1(x,y),y=Y)],x=X)] );

Interpolation:-SplineInterpolation([_rtable[18446744074399121150], _rtable[18446744074399121270]], _rtable[18446744074399113214], verify = false)

(12)

plot3d([F1(x,y), '1+F1_(x,y)'], x=0..1, y=0..1);

 

S1_:=Interpolation:-SplineInterpolation( X,  [seq(fsolve(F1_(x, y), x), y=Y)] );

Interpolation:-SplineInterpolation([_rtable[18446744074449580390]], Vector[row](11, {(1) = .8471962164, (2) = .7961144432, (3) = .7548618542000001, (4) = .7211061446, (5) = .6931443837, (6) = .6697004904, (7) = .6498166028, (8) = .6327736053999999, (9) = .6180256179, (10) = .6051531019, (11) = .593829713}), verify = false)

(13)

S1_(1/2);

HFloat(0.6697004904)

(14)

solu:=(x,y)->fsolve(U + 'S1_'(2*y*exp(-U))=x, U);

proc (x, y) options operator, arrow; fsolve(U+('S1_')(2*y*exp(-U)) = x, U) end proc

(15)

solu(0.3,0.4);

-.2865364247

(16)

U1_:= Interpolation:-SplineInterpolation( [X, Y],  [seq([seq(solu(x,y),y=Y)],x=X)] );

Interpolation:-SplineInterpolation([_rtable[18446744074439092814], _rtable[18446744074439092934]], _rtable[18446744074439093054], verify = false)

(17)

U1(0.1,0.2); U1_(0.1,0.2);

-.5354543130

 

HFloat(-0.5354485486)

(18)

F2_:=proc(x,y)
  local z, u:=evalf(U1_(x,y));
  evalf(9/8*y + 9/8 - 21/8*y*exp(-2*x) - 21/8*exp(-x)) + 3/4*int(''F1_''(x - z, 2*y*exp(-z)), z = 0 .. u, numeric)
end:
 

F2(0.1,0.2), F2_(0.1,0.2);

-1.139973599, HFloat(-1.1400076769496776)

(19)

 


 

Download int_iters.mw

 

On my Windows 7&10, the Maple commands work as expected:

!cmd
                               -1

!calc # ==> opens a console and launch calc.exe (the Windows calculator)
                               0
system(calc);
                               0
system("calc.exe");
                               0
!"cmd /c dir";
                               0
!"cmd /c calc";
ssystem("dir"); # ==>  contents of the current directory (Maple)

 

restart;
vars := [x,y,z]:
m1,m2,m3 := (a-b)*x*y*z^2, c*x^3, 3*b*x*y*z^2:
EqMon := (m1,m2,vars::list(name)) -> not depends(m1/m2, vars):
EqMon(m1,m2,vars), EqMon(m2,m3,vars), EqMon(m1,m3,vars);
#                       false, false, true

 

SOL:= u(x, t) = limit(op(1,rhs(sol)),n=0) + subs('n=0..infinity' = 'n=1..infinity', rhs(sol)):
plot3d(subs(infinity=100, rhs(SOL)), x=0..3, t=0..2);

You should inspect visually the integrals.
It's easy to see that the integral wrt phi can be computed symbolically (and actually ==> some integrals are 0).
Then compute numerically wrt theta and r. It will be much faster.

Also, for other 3 dimensional int, try a fast (low precision)  e.g.
Int( ...,  epsilon=1e-2, method=_CubaDivonne)

 

 

s4:=series(ex, epsilon, 4): # ex is your expression
coeff(s4, epsilon, 2); # coeff of epsilon^2

 

A := Matrix(2,3,()->randpoly(t,degree=1));
int~(A,t=-1..1);

 

That is what subs must do:

subs(a=b, {c=d}, {e=f}, {g=h} ) ==> successive substitutions  a=b, c=d, e=f  in  {g=h}.
In your case sol := {c=d}, {e=f}, {g=h}

First 41 42 43 44 45 46 47 Last Page 43 of 111