Axel Vogt

5821 Reputation

20 Badges

20 years, 224 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are replies submitted by Axel Vogt

@Nick_99 

roughly 1 second to compute the anti-derivative

 

NB: you need "Re( ... )" for plotting because 2F1 may have spurious numerical imaginaries - or use plot( [Re(...), Im(...)], ...)

NB2: do *not* use brackets like " [ ", use ordinary brackets like " ( " in your functions

@nm 

You are right, I made an error through copy + paste and will correct my answer, I have to add 800*t

Fails for me too (FF 83 portable, I have blocked some servers through DNS, but never observed a problem usinf Mapleprimes)

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/prove.mw .

 

 

@tomleslie I modified your solution
 

https://www.mapleprimes.com/questions/231147-Unevaluated-Integral

  restart; Digits:=10;

10

(1)

  eq1:=diff(f(y), y$4)+Uhs*diff(E(y),y$3)-(diff(f(y), y$2))+(diff(theta(y), y$1))= 0:

  eq2:=diff(theta(y), y$2)+(diff(f(y), y$2)+1)^2+1+diff(theta(y),y$2) = 0:

  E:=y->zeta*(cosh(k/2*(h1+h2-2*y)))/(cosh(k/2*(h1-h2))):

  bcs:= f(h1) = -(1/2)*(Q-1-d),
        f(h2) = (1/2)*(Q-1-d),
        (D(f))(h1) = -1,
        (D(f))(h2) = -1,
        theta(h1) = 0,
        theta(h2) = 1:

  epsilon1:=0.1:                    d:=1:                             omega:=Pi/6:
  h1:=-(1+epsilon1*sin(2*Pi*x)):    h2:=d+epsilon2*sin(2*Pi*x+omega): F:= Q-1-d:
  epsilon2:=0.5:                    x:=1:                             alpha:=Pi/6:

  d1 := subs( Uhs =-2,
              zeta=3,
              k=1,
              [eq1, eq2, bcs ]
            ):

d1_var:=eval(d1, [f=ff, Q=QQ]);

[diff(diff(diff(diff(ff(y), y), y), y), y)-3.52436433981067*sinh(-.125000000000000+y)-(diff(diff(ff(y), y), y))+diff(theta(y), y) = 0, 2*(diff(diff(theta(y), y), y))+(diff(diff(ff(y), y), y)+1)^2+1 = 0, ff(-1.) = -(1/2)*QQ+1, ff(1.25000000000000) = (1/2)*QQ-1, (D(ff))(-1.) = -1, (D(ff))(1.25000000000000) = -1, theta(-1.) = 0, theta(1.25000000000000) = 1]

(2)

 

F:=proc(Q)
local deq,sol,g;
deq:=eval(d1_var, QQ=Q);
sol:= dsolve(deq, numeric, output=listprocedure):
g:= unapply( rhs(sol[5])(z)-3.524364340*cosh(-0.1250000000 + rhs(sol[1])(z))-rhs(sol[3])(z)-1/2+rhs(sol[6])(z),z);
evalf(Int(g, 0..1, epsilon=1e-8));
end proc:

#F(0); # test

HFloat(-2.8641783992249827)

(3)

plot(F, -3 .. 3, numpoints=10);

 

 


 

Download MP_231147.mw

@Mo_Jalal 

Clearly it is never 0. But it can take any other value for x being a complex number: for that write g(x) = 1/w, any w not 0. Then you have cubic in x = w and you know it always has a solution.

combine                            ?

Plot the function - then you see what to do

and if not: it should be easy to define such a function (if - else and how to behave at the jump)

look up the help and find a sheet attached

MP_230629.mws

Besides that I doubt you can still buy it:

Version 9.5 is dated, 15 years old. Once I tested it to use it on Windows 7 (~ 2010) and it did not work properly for that operating system.

@rookie 

No typo, it reminds me that I modified the original, https://svn.r-project.org/R/trunk/src/library/stats/src/zeroin.c 

@vv so you say the random number is added for each call of f ... hm. But the optimum is searched for the (guessed) f0 ? Then I got it wrong

@mmcdara

Find some examples from the package (which is free) in the attached pdf. Certainly it solves the example in the paper (at the end).

Examples_from_DirectSearch.pdf

@J F Ogilvie unfortunately not, I was trying to understand the task

Probably the best would be to use https://www.maplesoft.com/applications/view.aspx?SID=101333, stable and validated, instead of trying to translate a 40 year old code

First 11 12 13 14 15 16 17 Last Page 13 of 207