Axel Vogt

5408 Reputation

20 Badges

17 years, 229 days
Munich, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

For example you can convert it to a name:

"6T1": convert(%, name);
                                 6T1

 

On Windows you can call a system library

restart; interface(version);
theDLL:="C:\\WINDOWS\\SYSTEM32\\urlmon.dll";

URLDownloadToFile := define_external(
  'URLDownloadToFileA',
  pCaller::integer[4],
  szURL::string,
  szFileName::string,
  dwReserved::integer[4],
  lpfnCB::integer[4],
  'RETURN'::integer[4] ,
  LIB=theDLL):

DL:= proc() URLDownloadToFile(0, Url, Destination, 0, 0) end proc;
# return code = 0 means success

Url:="https://opendata.ecdc.europa.eu/covid19/casedistribution/csv";
Destination := "d:\\temp\\data.csv";

DL();

download_using_urlmon_on_windows.mws

Consider it as composition of the 2 functions f:= t -> sin(t)/t and g:= x -> x*sin(1/x)

If you want the numerical value only then you can just enter Int(...) - using UpperCase - and then evalf(). The numerical integrator is quite good and here cares for the "numerical singularity" in x=0

restart; Digits:=10;
Int(x^5/(exp(x)-1)/(1-exp(-x)), x= 0..1); evalf(%);
                             0.2366158792

If you think it is too slow (or want higher precision) then here use IntegrationTools:-Change(%, x=1/y,y); before evalf.

You may try the following, giving BesselI(0, r)+BesselI(1, r):

Int(g, theta = 0 .. Pi); Expand(%); value(%) assuming 0<r;

Expand the results to see that are the same

Yet another way, using "type":


 

restart;

f:=x^6-3*x-5;
L:=[solve(%)];
select(type, L, 'realcons');
evalf(%);

f := x^6-3*x-5

L := [RootOf(_Z^6-3*_Z-5, index = 1), RootOf(_Z^6-3*_Z-5, index = 2), RootOf(_Z^6-3*_Z-5, index = 3), RootOf(_Z^6-3*_Z-5, index = 4), RootOf(_Z^6-3*_Z-5, index = 5), RootOf(_Z^6-3*_Z-5, index = 6)]

[RootOf(_Z^6-3*_Z-5, index = 1), RootOf(_Z^6-3*_Z-5, index = 4)]

[1.45157146456211, -1.09429273656731]

(1)

 


 

Download MP_228473_real_roots.mws

Besides 'adding' to fourier rules you may use

inttrans:-fourier(erf(x),x,k); convert(%, Int, only=fourier);
value(%); # Maple 2017

It seems you zeroes are 10*Pi*k*(1/3), 5*Pi*(2*k+1)*(1/3), k an integer

I converted to 'rational', used asymptotics to find a scaling and final get the above (find an ugly sheet attached)

MP_228037.mw

no problem in Maple 2017.3

210867-Evaluating-A-Sum.pdf

Your task has a result through the bivariate cumulative normal. Maple does not have it built in.

2*exp(1/4*tp^2*delta^2+sigma)*tp*Pi^(1/2)*
  cdfN2(-1/2*(delta*tp^2-2*tf)*2^(1/2)/tp,-1/2*delta*tp+lambda,1/2*2^(1/2))

MP227459_-_short.mws

 

PS 15-07-2019: in case of questions please post them here (I do not want privat emails if that involves gmail = Google).

Writing r = E__fv and feeding data it is obvious that numerically almost nothing is contributed to r (if being not close to zero) within the exp term (depends on settings for Digits). The equation boils down to

'.239735220903707e26*(ln(1+.241440919407021e21*exp(r-.3012136e-20 * 0))+ln(1+.241440919407021e21*exp(r-.1185628e-19 * 0)))/Pi = .3e25';

Which is solved immediately

I used upper case Int and Digits:=15 to get 0.187286133249768

Int(exp(-b*x)/(exp(-2*b*x)*a+exp(-4*x)),x):
IntegrationTools:-Change(%, x=ln(t),t): simplify(%) assuming 0<t; #simplify(%, symbolic);
value(%):
simplify(%) assuming  b::real, 0<t;
#convert(%, hypergeom);
                         /      (-b + 3)
                        |      t
                        |  ----------------- dt
                        |   (-2 b + 4)
                       /   t           a + 1


             (-b + 4)            (-2 b + 4)        b - 4
            t         LerchPhi(-t           a, 1, --------)
                                                  -4 + 2 b
          - -----------------------------------------------
                               -4 + 2 b

 

You may try the following to study the task:

#Eq1:=Eq1*omega__n^5:
#Eq2:=Eq2*omega__n^5:
sys := { Eq1 , Eq2 };

eliminate(%, [p]): map(simplify, %);

2 3 4 5 6 7 8 Last Page 4 of 89