Mariusz Iwaniuk

1491 Reputation

14 Badges

8 years, 281 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by Mariusz Iwaniuk

Calculating point with newton method:

restart;
with(Student[NumericalAnalysis]):
with(plots):
f := x^3-x^2-x-1;
P := Newton(f, x = 2.0, tolerance = 10^(-2));
p1 := pointplot([[P, 0]], color = [blue], symbolsize = 20, symbol = circle, axes = normal):
p2 := plot(f, x = 0 .. 2.2):
display({p1, p2});

 

First iteration:   

evalf(eval(simplify(x-f/(diff(f, x))), x = 2));
# 1.857142857

 

Hi

I'm only changed "Equation" to "2*M" , "Solu" to "Solu[1]" and other things.

Regards Mariusz.

Help_v2.mw

 

 I'm not an expert on that topic.

With help from: https://www.maplesoft.com/applications/view.aspx?sid=4971  (See: A Numeric Approach).

 

restart;
f := proc (u) options operator, arrow; piecewise(0 <= u and u <= 1, 0, 1 < u and u <= 2, 1) end proc;
ode := diff(y(u), u$2) = 4*Pi^2*(f(u)-e)*y(u); bc := y(0) = 0, y(2) = 0, (D(y))(0) = 1;
Eigen1 := (dsolve({bc, ode}, numeric, range = 0 .. 2, maxmesh = 8192, abserr = 1.*10^(-3), approxsoln = [y(u) = exp(-u), e = 1]))(0)[4];
Eigen2 := (dsolve({bc, ode}, numeric, range = 0 .. 2, maxmesh = 8192, abserr = 1.*10^(-3), approxsoln = [y(u) = u, e = 3]))(0)[4];
Eigen3 := (dsolve({bc, ode}, numeric, range = 0 .. 2, maxmesh = 8192, abserr = 1.*10^(-3), approxsoln = [y(u) = u, e = 6]))(0)[4];

In Maple there is not much choice how to do it.

One of the possibilities is textplot.

with(plots):
p1 := pointplot([[3, 8], [-5, 16], [11, 32], [3, -8]], color = [black], symbol = solidbox, axes = none, symbolsize = 12): 
p2 := textplot({[-5, 16+2, "lampart"], [3, (-8)-2, "dog"], [3, 8+3, "cat"], [11, 32+4, "panthera"]}, axes = none):
p3 := implicitplot(y^2 = x^3-43*x+166, x = -40 .. 40, y = -40 .. 40, axes = normal, gridrefine = 2): 
display({p1, p2, p3})

Your formula is very complicated,closed form solution may be not exist(Mathematica also can't solve)

Maybe you can try a Numeric Inverse Laplace to solve your problem.

Help.mw

 


 

X := [seq(i, i = 0 .. 24)]; Y := [1154, 1156, 1156, 1155, 1152, 1143, 1105, 1069, 1051, 1077, 1117, 1154, 1154, 1156, 1158, 1157, 1155, 1152, 1128, 1089, 1058, 1059, 1092, 1130, 1163]

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]

 

[1154, 1156, 1156, 1155, 1152, 1143, 1105, 1069, 1051, 1077, 1117, 1154, 1154, 1156, 1158, 1157, 1155, 1152, 1128, 1089, 1058, 1059, 1092, 1130, 1163]

(1)

with(Statistics)

f := Fit(a*sin(b*x+c)+d, X, Y, x, initialvalues = [a = 50, b = -1/2, c = 2, d = 1100])

-HFloat(48.70292499204853)*sin(HFloat(0.5173979580818461)*x-HFloat(2.5826651644523233))+HFloat(1124.950148688867)

(2)

plot({f(x), [seq([X[i], Y[i]], i = 1 .. 25)]}, x = 0 .. 24, style = [line, point])

 

``


 

Download fit.mw

Using another initalvalues:

f := Fit(a*sin(b*x+c)+d, X, Y, x, initialvalues = [a = 50, b = 1/2, c = 1/2, d = 1120]);

#f := 48.7029442510649*sin(0.517394221899901*x+0.558920097492524)+1124.95011131587

Maple gives almost the same as Geogebra


Maple 2017.2 output:

 

dsolve({B(t)*(diff(B(t), t, t))*A(t)-A(t)*(diff(B(t), t))^2-(diff(A(t), t, t))*B(t)^2+(diff(A(t), t))*B(t)*(diff(B(t), t))-A(t) = 0, diff(A(t), t) = 0});

#[{B(t) = B(t)}, {A(t) = 0}], [{A(t) = _C3}, {B(t) = (1/2)*_C1*(1/((exp(_C2/_C1))^2*(exp(t/_C1))^2)+1)*exp(_C2/_C1)*exp(t/_C1), B(t) = (1/2)*_C1*((exp(_C2/_C1))^2*(exp(t/_C1))^2+1)/(exp(_C2/_C1)*exp(t/_C1))}]

 

Digits := 20;
sol := 126*0.9 = int(14*t*exp(-(1/3)*t), t = 0 .. x);
solve({sol, x > 0}, {x})

#{x = 11.669160509602287174}

As procedure:

UpperLimit := proc (percent) rhs(solve({(126/100)*percent = int(14*t*exp(-(1/3)*t), t = 0 .. x), 0 < x}, x)[1]) end proc;
UpperLimit(90)

#-3-3*LambertW(-1, -(1/10)*exp(-1))

evalf(UpperLimit(90))# 90%

# 11.669160509602287174

evalf(UpperLimit(50))# 50%

#5.0350409700499819602

evalf(UpperLimit(10))# 10%

#1.5954348251688360603

 


 

Sum(Sum((t+1)*Q[h]^2*(1-Q[h])^(t+T)/(t+1+(R[h]/S[h])^sigma*(T+1)), t = 0 .. infinity), T = 0 .. infinity)

Sum(Sum((t+1)*Q[h]^2*(1-Q[h])^(t+T)/(t+1+(R[h]/S[h])^sigma*(T+1)), t = 0 .. infinity), T = 0 .. infinity)

(1)

NULL

func := (t+1)*Q[h]^2*(1-Q[h])^(t+T)/(t+1+(R[h]/S[h])^sigma*(T+1))

(t+1)*Q[h]^2*(1-Q[h])^(t+T)/(t+1+(R[h]/S[h])^sigma*(T+1))

(2)

s1 := `assuming`([sum(func, t = 0 .. infinity, formal)], [Q[h] > 0, R[h] > 0, S[h] > 0, sigma > 0])

Q[h]^2*(1-Q[h])^T*((R[h]^sigma*T+S[h]^sigma+R[h]^sigma)*S[h]^(-sigma)/Q[h]-R[h]^sigma*(R[h]^sigma*T^2+S[h]^sigma*T+2*R[h]^sigma*T+S[h]^sigma+R[h]^sigma)*(S[h]^(-sigma))^2*LerchPhi(1-Q[h], 1, (R[h]^sigma*T+S[h]^sigma+R[h]^sigma)*S[h]^(-sigma)))/((R[h]/S[h])^sigma*T+(R[h]/S[h])^sigma+1)

(3)

evalf(Sum(s1, T = 0 .. infinity))

Sum(Q[h]^2*(1-Q[h])^T*((R[h]^sigma*T+S[h]^sigma+R[h]^sigma)*S[h]^(-sigma)/Q[h]-R[h]^sigma*(R[h]^sigma*T^2+S[h]^sigma*T+2*R[h]^sigma*T+S[h]^sigma+R[h]^sigma)*(S[h]^(-sigma))^2*LerchPhi(1-Q[h], 1, (R[h]^sigma*T+S[h]^sigma+R[h]^sigma)*S[h]^(-sigma)))/((R[h]/S[h])^sigma*T+(R[h]/S[h])^sigma+1), T = 0 .. infinity)

(4)

s2 := `assuming`([sum(func, T = 0 .. infinity, formal)], [Q[h] > 0, R[h] > 0, S[h] > 0, sigma > 0])

(t+1)*Q[h]^2*(1-Q[h])^t*(t*S[h]^sigma+S[h]^sigma+R[h]^sigma)*R[h]^(-sigma)*LerchPhi(1-Q[h], 1, (t*S[h]^sigma+S[h]^sigma+R[h]^sigma)*R[h]^(-sigma))/(t+1+(R[h]/S[h])^sigma)

(5)

evalf(Sum(s2, t = 0 .. infinity))

Sum((t+1)*Q[h]^2*(1-Q[h])^t*(t*S[h]^sigma+S[h]^sigma+R[h]^sigma)*R[h]^(-sigma)*LerchPhi(1-Q[h], 1, (t*S[h]^sigma+S[h]^sigma+R[h]^sigma)*R[h]^(-sigma))/(t+1+(R[h]/S[h])^sigma), t = 0 .. infinity)

(6)

NULL


 

Download Sums.mw

Using SeriesCoefficient function:

Well, Maples convert(func,FPS) or convert(func,Sum) function is not strong enough.

Using Maxima http://maxima.sourceforge.net/  powerseries function:

tanh(x) = Sum((4^n-1)*4^n*bernoulli(2*n)*x^(2*n-1)/factorial(2*n), n = 0 .. infinity)

tanh(x+1) = Sum((4^n-1)*4^n*bernoulli(2*n)*(x+1)^(2*n-1)/factorial(2*n), n = 0 .. infinity)

 

Regards Mariusz

restart;

k := 5;

EQ := diff(u(x, t), t) = k*(diff(u(x, t), x$2));

ibc := u(0, t) = 0, u(1, t) = 0, u(x, 0) = x;

sol := pdsolve({EQ, ibc});

J := eval(subs(_Z1 = n, sol), infinity = 100);

int(value(eval(rhs(J), x = .5)), t = 0 .. 10)

 

(*0.01249999355*)

If You type:

sol := dsolve(diff(ln(y(x)), x) = y(x)^(1/(1-y(x))), y(x), 'implicit')

solution is implicit form.You must type:

sol := dsolve(diff(ln(y(x)), x) = y(x)^(1/(1-y(x))), y(x), 'explicit')

sol := y(x) = RootOf(x-Intat(_a^(-(-2+_a)/(-1+_a)), _a = _Z)+_C1)

form more details see:

https://www.maplesoft.com/support/help/maple/view.aspx?path=dsolve%2fdetails

but You can't solve this integral int(x^x,x) ,symbolic(analitically) solution does not exist yet,maybe in the future.

 

See this :

https://en.wikipedia.org/wiki/Nonelementary_integral

 


 

NULL

restart

`assuming`([int(1/(x^2*sqrt(1-x^4/b^4)), x = a .. b)], [b > a])

(-a^4+b^4)^(1/2)/(b^2*a)+2^(1/2)*signum(b)*EllipticK((1/2)*2^(1/2))/b-2*2^(1/2)*signum(b)*EllipticE((1/2)*2^(1/2))/b-((1/2)*I)*2^(1/2)*signum(b)*EllipticPi((-a^2+b^2)^(1/2)*signum(b)/b, 1, (1/2)*2^(1/2))/b

(1)

`assuming`([int(1/(x^2*sqrt(1-x^4/b^4)), x = a .. b)], [b > a, b > 0, a > 0])

(-a^4+b^4)^(1/2)/(b^2*a)+(1/2)*2^(1/2)*EllipticF((-a^2+b^2)^(1/2)/b, (1/2)*2^(1/2))/b-2^(1/2)*EllipticE((-a^2+b^2)^(1/2)/b, (1/2)*2^(1/2))/b

(2)

int(1/(x^2*sqrt(1-x^4/b^4)), x = a .. b, AllSolutions)

piecewise(a < b, piecewise(b = 0, infinity, (EllipticK(I)-EllipticE(I))/b)+piecewise(And(0 < b, a < 0), infinity, 0)+piecewise(And(0 < b, a < -b), -(EllipticF(signum(b), I)-EllipticE(signum(b), I))*(b^(1/2)*(-1/b)^(1/2)-(1/b)^(1/2)*(-b)^(1/2))*signum(b)^2/(b^(1/2)*(-b)^(1/2)), 0)-piecewise(a = 0, -infinity, -b = a, -(1/b)^(1/2)*(EllipticF(signum(b), I)-EllipticE(signum(b), I))*signum(b)^2/b^(1/2), -((-a^2+b^2)^(1/2)*(a^2+b^2)^(1/2)*EllipticE(a/abs(b), I)*signum(b)*a*b-(-a^2+b^2)^(1/2)*(a^2+b^2)^(1/2)*EllipticF(a/abs(b), I)*signum(b)*a*b-a^4+b^4)/((-a^4+b^4)^(1/2)*a*abs(b)^2)), b = a, 0, b < a, -piecewise(a = 0, infinity, -b = a, -(-1/b)^(1/2)*(EllipticF(signum(b), I)-EllipticE(signum(b), I))/(-b)^(1/2), -((-a^2+b^2)^(1/2)*(a^2+b^2)^(1/2)*EllipticE(a/abs(b), I)*signum(b)*a*b-(-a^2+b^2)^(1/2)*(a^2+b^2)^(1/2)*EllipticF(a/abs(b), I)*signum(b)*a*b-a^4+b^4)/((-a^4+b^4)^(1/2)*a*abs(b)^2))-piecewise(And(0 < a, b < 0), infinity, 0)-piecewise(And(b < 0, -b < a), -(EllipticF(signum(b), I)-EllipticE(signum(b), I))*(b^(1/2)*(-1/b)^(1/2)-(1/b)^(1/2)*(-b)^(1/2))*signum(b)^2/(b^(1/2)*(-b)^(1/2)), 0)+piecewise(b = 0, -infinity, (EllipticK(I)-EllipticE(I))/b))

(3)

``


 

Download Integral_ver2.mw

 

sol4 := fsolve([sol1, sol2], {T = 0...0.5, W = 0...30});

 {T = 0.3216117634, W = 29.46435118}

Mathematica says the same what a Maple.

 

maple_solution.mw

First 15 16 17 18 19 20 Page 17 of 20