Mariusz Iwaniuk

1491 Reputation

14 Badges

8 years, 260 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by Mariusz Iwaniuk

1.

convert(Ei(1, -ln(a-2)), Sum, dummy = n);

#-gamma-ln(-ln(a-2))+Sum((-1)^n*(-ln(a-2))^(n+1)/(factorial(n+1)*(n+1)), n = 0 .. infinity)

2.

convert(Ei(a, b), Sum, dummy = n);

eval(%, b = 1);

value(%);

limit(%, a = 1);

evalf(%);

#0.2193839344

 

Probably your equation have no analytical solution.


 

restart

-3*Pi^2*3^(2/3)*4^(1/3)*S^3*(epsilon/Pi)^(2/3)+16*a*(S/Pi)^(3/2)*Pi^5+24*S^4*Pi = 0

-3*Pi^2*3^(2/3)*4^(1/3)*S^3*(epsilon/Pi)^(2/3)+16*a*(S/Pi)^(3/2)*Pi^5+24*S^4*Pi = 0

(1)

simplify(-3*Pi^2*3^(2/3)*4^(1/3)*S^3*(epsilon/Pi)^(2/3)+16*a*(S/Pi)^(3/2)*Pi^5+24*S^4*Pi = 0)

-3*3^(2/3)*2^(2/3)*S^3*Pi^(4/3)*epsilon^(2/3)+16*a*Pi^(7/2)*S^(3/2)+24*S^4*Pi = 0

(2)

solve((2),[S]);

[[S = 0], [S = RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*epsilon^(2/3)*_Z^3+16*Pi^(7/2)*a+24*Pi*_Z^5)^2]]

(3)

allvalues([[S = 0], [S = RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*epsilon^(2/3)*_Z^3+16*Pi^(7/2)*a+24*Pi*_Z^5)^2]])

[[S = 0], [S = RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*epsilon^(2/3)*_Z^3+16*Pi^(7/2)*a+24*Pi*_Z^5, index = 1)^2]], [[S = 0], [S = RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*epsilon^(2/3)*_Z^3+16*Pi^(7/2)*a+24*Pi*_Z^5, index = 2)^2]], [[S = 0], [S = RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*epsilon^(2/3)*_Z^3+16*Pi^(7/2)*a+24*Pi*_Z^5, index = 3)^2]], [[S = 0], [S = RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*epsilon^(2/3)*_Z^3+16*Pi^(7/2)*a+24*Pi*_Z^5, index = 4)^2]], [[S = 0], [S = RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*epsilon^(2/3)*_Z^3+16*Pi^(7/2)*a+24*Pi*_Z^5, index = 5)^2]]

(4)

epsilon := 1; a := 1

1

 

1

(5)

rhs((3)[2][1])

RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*_Z^3+16*Pi^(7/2)+24*Pi*_Z^5)^2

(6)

[evalf(allvalues(RootOf(-3*3^(2/3)*2^(2/3)*Pi^(4/3)*_Z^3+16*Pi^(7/2)+24*Pi*_Z^5)^2))]

[HFloat(1.071956098421639)+HFloat(2.5245757717629815)*I, -HFloat(1.932416441934298)-HFloat(1.5609688301792792)*I, HFloat(2.9299146528586517), -HFloat(1.932416441934298)+HFloat(1.5609688301792792)*I, HFloat(1.071956098421639)-HFloat(2.5245757717629815)*I]

(7)

``


 

Download rootof_ver2.mw

 


 

restart

eq:=I*mu*A(t[2])*omega[0]*(1/2)-A(t[2])*omega[0]*(diff(B(t[2]), t[2]))+I*(diff(A(t[2]), t[2]))*omega[0]-(1/4)*A(t[2])^5*beta[2]*omega[0]^2-(1/4)*A(t[2])^3*beta[1]*omega[0]^2-(1/2)*F[0]*exp(I*sigma*t[2]-I*B(t[2]))+5*alpha[2]*A(t[2])^5*(1/16)+3*alpha[1]*A(t[2])^3*(1/8);

((1/2)*I)*mu*A(t[2])*omega[0]-A(t[2])*omega[0]*(diff(B(t[2]), t[2]))+I*(diff(A(t[2]), t[2]))*omega[0]-(1/4)*A(t[2])^5*beta[2]*omega[0]^2-(1/4)*A(t[2])^3*beta[1]*omega[0]^2-(1/2)*F[0]*exp(I*sigma*t[2]-I*B(t[2]))+(5/16)*alpha[2]*A(t[2])^5+(3/8)*alpha[1]*A(t[2])^3

(1)

eq2:=simplify(eq);

-(1/2)*F[0]*exp(-I*(-sigma*t[2]+B(t[2])))+I*(diff(A(t[2]), t[2]))*omega[0]+(1/2)*(-2*(diff(B(t[2]), t[2]))*omega[0]+(-(1/2)*beta[2]*omega[0]^2+(5/8)*alpha[2])*A(t[2])^4+(-(1/2)*beta[1]*omega[0]^2+(3/4)*alpha[1])*A(t[2])^2+I*mu*omega[0])*A(t[2])

(2)

subs(-sigma*t[2]+B(t[2]) = C(t2), eq2)

-(1/2)*F[0]*exp(-I*C(t2))+I*(diff(A(t[2]), t[2]))*omega[0]+(1/2)*(-2*(diff(B(t[2]), t[2]))*omega[0]+(-(1/2)*beta[2]*omega[0]^2+(5/8)*alpha[2])*A(t[2])^4+(-(1/2)*beta[1]*omega[0]^2+(3/4)*alpha[1])*A(t[2])^2+I*mu*omega[0])*A(t[2])

(3)

eval(eq2,-sigma*t[2]+B(t[2])=C(t2));

-(1/2)*F[0]*exp(-I*C(t2))+I*(diff(A(t[2]), t[2]))*omega[0]+(1/2)*(-2*(diff(B(t[2]), t[2]))*omega[0]+(-(1/2)*beta[2]*omega[0]^2+(5/8)*alpha[2])*A(t[2])^4+(-(1/2)*beta[1]*omega[0]^2+(3/4)*alpha[1])*A(t[2])^2+I*mu*omega[0])*A(t[2])

(4)

 


 

Download no_change_ver2.mw

The standard way to solve systems of equations numerically is using fsolve.  For example:

fsolve({x^2-y-3, x*y+2*y^2-4 = 0}, {x = 0.5 .. 2.5, y = 0 .. 3});

#{x = 2.000000000, y = 1.000000000}

 

That's what the fsolve command will do with it.

infolevel[fsolve]:=6:
fsolve({x^2-y-3, x*y+2*y^2-4 = 0}, {x = 0.5 .. 2.5, y = 0 .. 3});


#fsolve: trying multivariate Newton iteration
#fsolve:
#guess vector Vector(2, [2.1564724756843477,.13446305023563622])
#fsolve: norm of errors: 5.1897839975614897
#fsolve: new norm: 3.6816464474611895
#fsolve: iter = 1 |incr| = 1.4002 new values x = 2.1216 y = 1.4998
#fsolve: new norm: .43227630491510698
#fsolve: iter = 2 |incr| = .53690 new values x = 2.0189 y = 1.0655
#fsolve: new norm: 0.9718475514730430e-2
#fsolve: iter = 3 |incr| = 0.82477e-1 new values x = 2.0005 y = 1.0015
#fsolve: new norm: 0.5297608520287e-5
#fsolve: iter = 4 |incr| = 0.19416e-2 new values x = 2.0000 y = 1.0000
#fsolve: new norm: 0.1568000e-11
#fsolve: iter = 5 |incr| = 0.10595e-5 new values x = 2.0000 y = 1.0000
#fsolve: new norm: 0.
#fsolve: iter = 6 |incr| = 0.31360e-12 new values x = 2.0000 y = 1.0000
#               {x = 2.000000000, y = 1.000000000}

Or using code from:https://www.mapleprimes.com/questions/200377-Nonlinear-Equations-With-Newoton-Newton#answer201481 thanks for Carl Love.


 

restart:

F:= unapply(<x1^2-y1-3,x1*y1+2*y1^2-4>, x1, y1):#Equations

NewtonsMethod:= proc(F, x0, {maxiters::posint:= 99}, {epsilon::positive:= 10^(3-Digits)})
local
     x, y,
     J:= unapply(VectorCalculus:-Jacobian(F(x,y), [x,y]), x, y),
     X:= x0,
     newX:= <1,1>,
     err:= <1+epsilon, epsilon>,
     k
;
     for k to maxiters while LinearAlgebra:-Norm(err)/LinearAlgebra:-Norm(newX) > epsilon do
          newX:= X - LinearAlgebra:-LinearSolve(J(X[1],X[2]), F(X[1],X[2]));
          err:= newX - X;
          X:= newX
     end do;
     if k > maxiters then  WARNING("Did not converge.")  end if;
     X
end proc:

NewtonsMethod(F, <0.5, 3.0>);

Vector(2, {(1) = 2.000000000000003, (2) = .9999999999999993})

(1)


 

Download MultiNewton.mw

 

 

 


 

restart

K := 1; k[e] := 1; d := 1; h := 1

F := proc (s, x) options operator, arrow; -2*K*(s+K)^2*k[e]*sinh((s+K)*x/d)/(s*d^2*(4*(s+K)^3*cosh((s+K)*h/d)*h/d^2-4*K*(s+K)*cosh((s+K)*h/d)*h/d+4*sinh((s+K)*h/d)*K)) end proc

F(s, x)

-2*(s+1)^2*sinh((s+1)*x)/(s*(4*(s+1)^3*cosh(s+1)-4*(s+1)*cosh(s+1)+4*sinh(s+1)))

(1)

NULL

Digits := 14

NLaplace := proc (F, t, x, n) local h, theta, z, dz; h := 2*Pi/n; theta := -Pi+(k+1/2)*h; z := n*(.5017*theta*cot(.6407*theta)-.6122+.2645*I*theta)/t; dz := n*((-1)*.5017*.6407*theta*csc(.6407*theta)^2+.5017*cot(.6407*theta)+.2645*I)/t; Re(evalf(-((1/2)*I)*h*(sum(exp(z*t)*F(z, x)*dz, k = 0 .. n))/Pi)) end proc

invLAP := proc (t, x) options operator, arrow; NLaplace(F, t, x, 32) end proc

plot(invLAP(1/2, x), x = -1 .. 1)

 

plot3d(invLAP(t, x), x = -1 .. 1, t = 0 .. 2)

 

NULL


 

Download ILT_(1).mw

This package is build-in Maple,you don't need to download anything:

Execute:

with(Student[Basics]);

LinearSolveSteps((x+1)/(2*y*z) = 4*y^2/z+3*x/y, x);

LinearSolveSteps function have some limitation only  for linear equations give steps.

LinearSolveSteps("x^2 -2*x+1 = 0", x); #Nonlinear equation. It doesn't work.

 

 

Eliminating variable m1 and m2 from equations, then we have only eq. with 2 variables k1 and k2.

Ploting we see they do not intersect anywhere, even at point {0,0}.


 

restart

sys := {(k1*m1+k1*m2+k2*m1+sqrt(k1^2*m1^2+2*k1^2*m1*m2+k1^2*m2^2+2*k1*k2*m1^2-2*k1*k2*m1*m2+k2^2*m1^2))/(2*m1*m2) = (2*Pi*8.78)^2, .8347192842*k1/m1 = (2*Pi*4.8515)^2, -(-30.85287127*k1-k2)/m2 = (2*Pi*8.78)^2, -(-k1*m1-k1*m2-k2*m1+sqrt(k1^2*m1^2+2*k1^2*m1*m2+k1^2*m2^2+2*k1*k2*m1^2-2*k1*k2*m1*m2+k2^2*m1^2))/(2*m1*m2) = (2*Pi*4.8515)^2}

{.8347192842*k1/m1 = 929.2055780, -(-30.85287127*k1-k2)/m2 = 3043.328048, -(1/2)*(-k1*m1-k1*m2-k2*m1+(k1^2*m1^2+2*k1^2*m1*m2+k1^2*m2^2+2*k1*k2*m1^2-2*k1*k2*m1*m2+k2^2*m1^2)^(1/2))/(m1*m2) = 929.2055780, (1/2)*(k1*m1+k1*m2+k2*m1+(k1^2*m1^2+2*k1^2*m1*m2+k1^2*m2^2+2*k1*k2*m1^2-2*k1*k2*m1*m2+k2^2*m1^2)^(1/2))/(m1*m2) = 3043.328048}

(1)

eq2 := eliminate(sys, {m1, m2})

[{m1 = 0.8983149735e-3*k1, m2 = 0.1013787235e-1*k1+0.3285876462e-3*k2}, {-0.2219750257e-1*k1^2-0.2848636636e-3*k1*k2+(1/2)*(0.1217974307e-3*k1^4-0.9347355846e-5*k1^3*k2+0.3245892274e-6*k1^2*k2^2)^(1/2), 0.2944183889e-2*k1^2-0.3391728651e-3*k1*k2+(1/2)*(0.1217974307e-3*k1^4-0.9347355846e-5*k1^3*k2+0.3245892274e-6*k1^2*k2^2)^(1/2)}]

(2)

plots:-implicitplot([eq2[2, 1] = 0, eq2[2, 2] = 0], k1 = -1 .. 1, k2 = -10 .. 10, view = [-1 .. 1, -10 .. 10], gridrefine = 5, color = ["Red", "Blue"], rational, thickness = 3)

 

plots:-implicitplot([eq2[2, 1] = 0, eq2[2, 2] = 0], k1 = -0.1e-3 .. 0.1e-3, k2 = -0.1e-1 .. 0.1e-1, view = [-0.1e-3 .. 0.1e-3, -0.1e-1 .. 0.1e-1], gridrefine = 5, color = ["Red", "Blue"], rational, thickness = 3)

 

``


 

Download No_solutions.mw

You must add 4 more (intial,boundary) condition if you what to solve by numeric method.
e.g. :{ U(0, t) = 1, U(1, t) = 0, V(0, t) = 0, V(1, t) = 0}


 

PDESYS := [diff(U(x, t), t)-(diff(U(x, t), x, x))-2*U(x, t)*(diff(U(x, t), x))+diff(U(x, t)*V(x, t), x), diff(V(x, t), t)-(diff(V(x, t), x, x))-2*V(x, t)*(diff(V(x, t), x))+diff(U(x, t)*V(x, t), x)]

[diff(U(x, t), t)-(diff(diff(U(x, t), x), x))-2*U(x, t)*(diff(U(x, t), x))+(diff(U(x, t), x))*V(x, t)+U(x, t)*(diff(V(x, t), x)), diff(V(x, t), t)-(diff(diff(V(x, t), x), x))-2*V(x, t)*(diff(V(x, t), x))+(diff(U(x, t), x))*V(x, t)+U(x, t)*(diff(V(x, t), x))]

(1)

NULL

IBC := [U(x, 0) = sin(x), V(x, 0) = sin(x), U(0, t) = 1, U(1, t) = 0, V(0, t) = 0, V(1, t) = 0]

[U(x, 0) = sin(x), V(x, 0) = sin(x), U(0, t) = 1, U(1, t) = 0, V(0, t) = 0, V(1, t) = 0]

(2)

sol := pdsolve(PDESYS, IBC, numeric)

_m489011961280

(3)

p1 := sol:-plot(V(x, t), t = 1/8, numpoints = 100, x = 0 .. 1, color = ["Blue"], legend = ["V(x,t)"])

p2 := sol:-plot(U(x, t), t = 1/20, numpoints = 100, x = 0 .. 1, color = ["Green"], legend = ["U(x,t)"])

plots:-display({p1, p2})

 

sol:-plot3d(U(x, t), t = 0 .. 1, x = 0 .. 1, grid = [100, 100])

 

sol:-plot3d(V(x, t), t = 0 .. 1, x = 0 .. 1, grid = [100, 100])

 

``


Executed in Maple 2018 !!!

Download pdesys.mw

Y := proc (delta, b, n) 
if n = 0 then 1/(b^2+1) 
elif n = 1 then arctan(1/b) 
elif n = 2 then 1+(1/2)*ln(b^2+1)-b*arctan(1/b) 
elif n = 3 then delta-(3/2)*b-(1/2)*b*ln(b^2+1)+(1/2)*arctan(1/b)*(b^2-1) 
elif n = 4 then (1/2)*delta^2-b*delta+(11/12)*b^2-11/36+(1/12)*ln(b^2+1)*(3*b^2-1)+(1/6)*b*arctan(1/b)*(3-b^2) 
elif n = 5 then (1/3)*delta^3-(1/2)*delta^2*b+(1/6)*delta*(3*b^2-1)+(25/72)*b-(25/72)*b^3+(1/12)*b*log(b^2+1)*(1-b^2)+(1/24)*arctan(1/b)*(1-6*b^2+b^4) 
elif n = 6 then (1/4)*delta^4-(1/3)*delta^2*b+(1/12)*delta^2*(3*b^2-1)+(1/6)*b*delta*(1-b^2)+(137/1440)*b^4-(137/720)*b^2+137/7200+(1/240)*log(b^2+1)*(5*b^4-10*b^2+1)+(1/120)*b*arctan(1/b)*(-5+10*b^2-b^4) 
elif n = 7 then (1/5)*delta^5-(1/4)*delta^4*b+(1/18)*delta^3*(3*b^2-1)+(1/12)*delta^2*b*(1-b^2)+(1/120)*delta*(5*b^4-10*b^2+1)-(49/2400)*b+(49/720)*b^3-(49/2400)*b^5+(1/720)*b*log(b^2+1)*(-3*b^4+10*b^2-3)+(1/720)*arctan(1/b)*(-1+15*b^2-15*b^4+b^6) 
end if 
end proc:

plot(Y(5, b, 7), b = 0 .. 10); # Example of use

 

u1 := proc (x, y) options operator, arrow; 1-exp(a*x)*cos(2*Pi*y) end proc;

a := -0.39323780;

evalf(int(u1(x, y)^2, y = -.5 .. 1.5, x = -.5 .. 1.5));

#5.493248990

#OR:

u := unapply(1-exp(a*x)*cos(2*Pi*y), [x, y]);

a := -0.39323780;

evalf(int(u(x, y)^2, y = -.5 .. 1.5, x = -.5 .. 1.5));

#OR:

u := 1-exp(a*x)*cos(2*Pi*y);

a := -0.39323780;

evalf(int(u^2, y = -.5 .. 1.5, x = -.5 .. 1.5));

Use  ExcelTools for import file.

 


 

Download testxlsx.mw

 

I don't have Maple V (This is an obsolete version,you need upgrade).

integral := Int(2*(sin(theta)/cos(theta))^(2*p-1), theta = 0 .. (1/2)*Pi);

with(IntegrationTools):

integral2 := Change(convert(integral, tan), tan(theta) = sqrt(t));

`assuming`([value(integral2)], [0 < p and p < 1]);

#Answer is: Pi*csc(Pi*p)

integral.mw

Executed in Maple 2018

Maple can't simplify better, probably V is not a solution of pde[1].

See attached file:

solution_ver_3.mw

BVP := [4*(diff(u(x, t), t))-9*(diff(u(x, t), x, x))-5*u(x, t) = 0, u(0, t) = 0, u(6, t) = 0, u(x, 0) = sin((1/6)*Pi*x)^2];

sol := pdsolve(BVP);

plot3d(eval(rhs(sol), infinity = 10), x = 0 .. 6, t = 0 .. 4);

OR:

plot3d(subs(infinity = 10, rhs(sol)), x = 0 .. 6, t = 0 .. 4);

OR:

plot3d(subs(infinity = 10, op(2, sol)), x = 0 .. 6, t = 0 .. 4)

First 11 12 13 14 15 16 17 Page 13 of 19