Mariusz Iwaniuk

902 Reputation

14 Badges

4 years, 65 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by Mariusz Iwaniuk

@sand15 

Thanks you for your efforts,but:

1.At first I need int(numeric),because I have  more complicated example and Int(symbolic) can't solve or is very slow.See

2.it does not matter if I use: Interpolation or CurveFitting.

3.Your answer dosen't work for me.("Problem is this method seems to diverge",Why ? I dosen't know)

Maybe exist a workaround and no need to convert code from MMA to Maple.

MMA solution with more complicated example:

 

@vv 

Maple's Sum have troubles, at t=1/10, workaround is:

Let's says for: t=3/100.

1/exp(2.)-evalhf(add(eval(2^(-j)*t^(-2*j)*GAMMA(-2*j+1, 1)*exp(-1)/factorial(j), t = 3/100), j = 0 .. 1000));

#-2.296937672*10^237

int(eval(exp(-1-1/v)*(1-exp(v^2/(2*t^2)))/v^2, t = 3/100), v = 0 .. 1, numeric);

#-2.296937672*10^237

,but for  t=2/100 or near t=0  gives: Float(-infinity) :P

 

Who needs such large numbers?

@weidade37211 

 

I did some tests and you can see Maple 2017.3 have bad performace and baheves incorrectly. 

 

 

@isifesai 

This has nothing to do with the first question.

Please post a new question.

@isifesai 

You can try Mathematica for free online(free plan),only you must sign-in to:https://www.wolframcloud.com

Maplesoft it does not give you that option yet.

@isifesai 

With MMA we can find solution with series and it easy to do: 

n = 5;
yrule = y -> Function[x, Sum[a[j] x^j, {j, 0, n}] + O[x, 0]^(n + 1)];
eq = y'[x] - (Exp[x] + 2/9*Exp[3] - 1/9 + Integrate[s *y[s]^3, {s, 0, 1}]) == 0 /. yrule // Simplify;
le = LogicalExpand[eq];
sol = Solve[le && (y[x] /. yrule /. x -> 0) == 1,Table[a[i], {i, 0, n}]];(*with the initial conditions y[0]\[Equal]1*)
Ysol[x_] = y[x] /. yrule /. First@sol // Normal // N

(* 1. - 5.59113 x + 0.5 x^2 + 0.166667 x^3 + 0.0416667 x^4 + 0.00833333 x^5 *)

Plot[Ysol[x], {x, -1, 1}]

I could translate MMA code to Maple code,but in Maple there is no equivalent to LogicalExpand function ,and this translation(LogicalExpand to Maple) is not my strength.

@Preben Alsholm 

When we expect the release of Maple 2018.2 ?

@vv 

Ohh my mistake ,You are right.

MMA code:

NIntegrate[(-\[Pi]^4 8 - 20 Log[x]^2*Pi^4 - 5 Log[x]^4*Pi^4 + 
  120 MeijerG[{{0, 0}, {1, 1, 1}}, {{0, 0, 0, 0, 0}, {}}, x, 
    1/\[Pi]])/(120 \[Pi]^4 (-1 + x)^2), {x, 4/10, 6/10}, 
 PrecisionGoal -> 25, AccuracyGoal -> 25, WorkingPrecision -> 50]

-0.0055516876936075055264305911679233087260653869140529

 

Thanks.

@vv 

MMA gives :-0.0026149280117044057519682563764021466985499038544268

 

MMA code:

NIntegrate[(\[Pi]^4 (8 + 20 Log[x]^2 + 5 Log[x]^4) - 
  120 MeijerG[{{0, 0}, {1, 1, 1}}, {{0, 0, 0, 0, 0}, {}}, x, 
    1/\[Pi]])/(120 \[Pi]^4 (-1 + x)), {x, 4/10, 6/10}, 
 PrecisionGoal -> 25, AccuracyGoal -> 25, WorkingPrecision -> 50]
Who should I trust now?

@Preben Alsholm 

I'm member of Maplesoft Beta Test program  and I sent them.

Is there any way(trick) to calculate integral numerically?

 

 

Maybe my code is not the best,but works.

 REALINT2 := proc (f, x) local func, a; 
 func := int(f, x); 
 a := selectfun(func, ln); 
 `assuming`([simplify(eval(func, [seq(a[k] = map(proc (x) options operator, arrow; 
 abs(x) end proc, a[k]), k = 1 .. nops(a))]))], [x in real]) end proc:

REALINT2(1+1/x, x); 
REALINT2(1/sin(x), x); 
REALINT2(x/(x^2+1), x); 
REALINT2(tan(x), x); 
REALINT2((diff(f(x), x))/f(x), x); 
REALINT2(1+1/abs(x), x); 
`assuming`([REALINT2(1/x, x)], [x < 0])

#                          x + ln(|x|)
#                 ln(1 - cos(x)) - ln(|sin(x)|)
#                          1   / 2    \
#                          - ln\x  + 1/
#                          2           
#                         -ln(|cos(x)|)
#                           ln(|f(x)|)
#                     / x - ln(-x)      x < 0
#                    |                      
#                    <  undefined       x = 0
#                    |                      
#                     \ x + ln(x)       0 < x
#                             ln(-x)

 

@mmcdara 

That will interest for you? See answer of user Kitonum

EDITED 08.08.2018

ERIK POSTMA MAPLE DEVELOPER  see his comments below:

 

@Markiyan Hirnyk 

PS. I obtain:

interface(version):

#Standard Worksheet Interface, Maple 2018.1, Windows 8.1, June 8 2018 Build ID 1321769

eval(EQ, {x = -.1141310781-1.108044977*I});

#-sqrt(3)*arctan((0.3804369270e-1+.3693483256*I)*sqrt(3))+1.191448054+1.298854071*I = 1

@digerdiga 

Yes add is faster than sum about 2x. Using evalhf I speed up the code.

Digits := 10; f := proc (x, n) options operator, arrow; evalhf(x*ln(n)-(1/2)*Pi-add(arctan(x/k), k = 1 .. n)) end proc;

tstart := time(); x := 2; INF := 10^7; [f(x, INF), evalf(argument(GAMMA(I*x)))]; tstop := time()-tstart;


#            [-1.44115011047774288, -1.441150010]
                             3.078

 

@asa12 

Ok the question it's now better,but I do not know anything about how to solve system of convolution.

I have no idea whether it is logically correct - simply because I have no idea what calculation you are performing or what answers you expect.

Regards.

First 6 7 8 9 10 11 12 Last Page 8 of 23