Mariusz Iwaniuk

932 Reputation

14 Badges

4 years, 180 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by Mariusz Iwaniuk

I found a workaround. See attached file.

DIFF_eq.mw


 

restart

with(NumberTheory)

n := 10^13; N := 346065536839

10000000000000

 

346065536839

(1)

evalf(trunc(add(Ei(ln(n)/j)*Moebius(j)/j, j = 1 .. 20)))-N

-5774.

(2)

evalf(trunc(add(Moebius(j)*Li(n^(1/j))/j, j = 1 .. 20)))-N

-5774.

(3)

evalf(trunc(-4*add((-1)^j*j*(ln(n)/(2*Pi))^(2*j-1)/((2*j-1)*bernoulli(2*j)), j = 1 .. 200)/Pi))-N

-5774.

(4)

evalf(trunc(1+add(ln(n)^j/(factorial(j)*j*Zeta(j+1)), j = 1 .. 300)))-N

-5774.

(5)

trunc(evalf(Li(n)))-N

108971

(6)

trunc(evalf(sqrt(exp(1)*n*Li(n/exp(1))/ln(n))))-N

452312

(7)

``


 

Download PrimePi_-approximation.mw

I have analitycal solution only with conditions:

[f3(0,t)=-exp(-2*t),f4(x,0)=exp(-3*x)*cos(2*Pi*x),f1(x,3)=0,f1(3,t)=0,f2(3,0)=0].

last condition You may change in the code from :f2(3,0)=0 to f2(0,3)=0

from eval(rhs(sol[2]), x = 3) = 0 to eval(rhs(sol[2]), t = 3) = 0 in SOL.

See attached file.

EQ_diff.mw

 

I don't have Maple 13.I used Maple 2019.2:

SOL := solve([13/4*m - 7/4*n - 3 = 0, -17/2*n*2^n + 34*m = 0]);

evalf(map(allvalues, {SOL}));

Gives:

{{m = -0.1262032999, n = -1.948663272}, {m = 2., n = 2.}, {m = 1.551915566 - 4.737602358*I, n = 1.167843193 - 8.798404378*I}, {m = 1.551915566 + 4.737602358*I, n = 1.167843193 + 8.798404378*I}}

 

I have no more adequate knowledge about multithreading in Maple,but my code seems to work. 

time give you total CPU time,I used  packages CodeTools to give You a REAL time computation.


 

kernelopts(version)

`Maple 2019.2, X86 64 WINDOWS, Oct 30 2019, Build ID 1430966`

(1)

restart

with(Threads); with(CodeTools)

p1 := proc (x) local i; Add(i, i = 1 .. 5000000) end proc; p2 := proc (x) local i; Add(i, i = 5000001 .. 1000000000) end proc; id1 := Create(p1(), out1); id2 := Create(p2(), out2); Usage(Wait(id1, id2)); out1+out2

memory used=2.51GiB, alloc change=19.69MiB, cpu time=2.76m, real time=20.24s, gc time=17.09s

 

500000000500000000

(2)

NULL

restart

with(CodeTools)

p1 := proc (x) local i; add(i, i = 1 .. 5000000) end proc; p2 := proc (x) local i; add(i, i = 5000001 .. 1000000000) end proc; Usage(p1()+p2())

memory used=2.51GiB, alloc change=30.00MiB, cpu time=65.97s, real time=64.78s, gc time=3.22s

 

500000000500000000

(3)

NULL

NULL


 

Download thread_time_AAA.mw

Using assumption and infinity not Infinity, works fine.

Integrals_Sheet2-A.mw

One way is using this package.

Extract file aene_v1_0.tar to any folder then open a file Sample.mws and copy my code to the file and execute.

eq:=diff(y(t),t$mu)=0.85*sqrt(y(t)^2)-0.85*y(t)^2:
IC:=[y(0)=0.5]:
Asolve([eq],IC,mu=1/2,t=0..1,y=0..1,false,index=10,output=plot,pade=[10,10]);

 

Or workaround:

restart;
T__ln := (1/2)*m__ws*v__l+(1/2)*I__ws*(diff(varphi__l(t), t))^2+((1/2*(m__zs+m__zp+m__wp))*v__l+(1/2*(I__zs+I__zp+I__wp))*(diff(varphi__l(t), t))^2)*z__11*eta/z__12+((1/2*(m__wk+m__zpk+m__k+m__zk))*v__l+(1/2*(I__wk+I__zpk+I__k+I__zk))*(diff(varphi__l(t), t))^2)*z__21*eta/z__22;
eval(diff(eval(T__ln, diff(varphi__l(t), t) = x), x), x = diff(varphi__l(t), t));

 

 

With package: MultiSeries Maple can:

N := 10;
(MultiSeries:-series(sin(x)^a, x = 0, N) assuming (0 < a));

#x^a - a*x^(2 + a)/6 + (-1/180*a + 1/72*a^2)*x^(4 + a) + (-1/2835*a + 1/1080*a^2 - 1/1296*a^3)*x^(6 + a) + (-1/37800*a + 101/1360800*a^2 - 1/12960*a^3 + 1/31104*a^4)*x^(8 + a) + O(x^(10 + a))

Another simpler way to compute this integral:


 

NULL

restart

Int(exp(-I*x*y)*exp(x)/cosh(x)^2, x = -infinity .. infinity)

Int(exp(-I*x*y)*exp(x)/cosh(x)^2, x = -infinity .. infinity)

(1)

with(IntegrationTools)

Change(Int(exp(-I*x*y)*exp(x)/cosh(x)^2, x = -infinity .. infinity), x = ln(z))

Int(4*z^(-I*y+2)/(z^2+1)^2, z = 0 .. infinity)

(2)

value(Int(4*z^(-I*y+2)/(z^2+1)^2, z = 0 .. infinity))

-Pi*(I*y-1)*sech((1/2)*Pi*y)

(3)

int(eval(exp(-I*x*y)*exp(x)/cosh(x)^2, y = 1), x = -infinity .. infinity, numeric)

1.252040331-1.252040331*I

(4)

evalf(eval(-Pi*(I*y-1)*sech((1/2)*Pi*y), y = 1))

1.252040331-1.252040331*I

(5)

``


 

Download Compute_integral.mw

A good question why inttrans does not work in this case? I don't know.

A trick: 

inttrans:-fourier(- diff(erf(x), x)*I/k, x, k);

# -2*I*exp(-k^2/4)/k # A correct answer.

int(erf(x)*exp(-I*x*k),x=-infinity..infinity);

# -2*I*exp(-k^2/4)/k !

evalf[10](Int(exp(-x)*sin(x^2/2)/(3 + x), x = 1 .. infinity));

#0.04279639331

Or:

Digits := 10:

int(exp(-x)*sin(x^2/2)/(3 + x), x = 1 .. infinity, numeric);

#0.04279639331

Execute: ?Digits ,to see more information.

with Maple 2019.2 :

int(1/(c*x + d), x = a .. b) assuming a < b;

#piecewise(And(a < -d/c, -d/c < b), undefined, (-ln(a*c + d) + ln(b*c + d))/c)

 

 

Do you have any reason to think there is a closed form? Most nonlinear ODE's don't have one.

With numerics,see attached file:
 

Download ODE.mw

You have a BVP type ODE ,RK methods dosen't work(in Maple) for yours ICS and BC.


 

restart

DE := diff(f(x), x, x, x)+(1/2)*(diff(f(x), x, x))*(cos(alpha)*x+sin(alpha)*f(x)) = 0

diff(diff(diff(f(x), x), x), x)+(1/2)*(diff(diff(f(x), x), x))*(cos(alpha)*x+sin(alpha)*f(x)) = 0

(1)

alpha := (1/2)*Pi

(1/2)*Pi

(2)

ics := f(0) = 0, (D(f))(0) = 1, (D(f))(20) = 0

f(0) = 0, (D(f))(0) = 1, (D(f))(20) = 0

(3)

sol := dsolve([DE, ics], numeric, method = bvp)

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(26, {(1) = .0, (2) = .7740276521903071, (3) = 1.5509825989797759, (4) = 2.3308983059361585, (5) = 3.113909662707222, (6) = 3.9014225800794105, (7) = 4.693952164204047, (8) = 5.491595526837149, (9) = 6.2936856079399695, (10) = 7.098221028140669, (11) = 7.905109527264662, (12) = 8.714340235562716, (13) = 9.524617524969804, (14) = 10.335254722758192, (15) = 11.14625230894588, (16) = 11.957542794627765, (17) = 12.768893990799713, (18) = 13.580286548493516, (19) = 14.391720133302103, (20) = 15.20317024911012, (21) = 16.01462180657243, (22) = 16.8260748057475, (23) = 17.635392539683593, (24) = 18.434295256637704, (25) = 19.222354441049287, (26) = 20.0}, datatype = float[8], order = C_order); Y := Matrix(26, 3, {(1, 1) = .0, (1, 2) = 1.0, (1, 3) = -.4437483631867375, (2, 1) = .6441085952500252, (2, 2) = .6716037030622702, (2, 3) = -.388537166894675, (3, 1) = 1.0593772338870806, (3, 2) = .411915568539731, (3, 3) = -.2772636888974909, (4, 1) = 1.3074339266596293, (4, 2) = .23766008890198692, (4, 3) = -.1740048342296656, (5, 1) = 1.4484429056919907, (5, 2) = .13200360213914475, (5, 3) = -.10118230657337712, (6, 1) = 1.526293002425342, (6, 2) = 0.7158430915633403e-1, (6, 3) = -0.5624459816685278e-1, (7, 1) = 1.568464356108971, (7, 2) = 0.382292301392669e-1, (7, 3) = -0.3043735342537328e-1, (8, 1) = 1.591019979362346, (8, 2) = 0.20207534170443832e-1, (8, 3) = -0.16202417731846604e-1, (9, 1) = 1.6029701258095048, (9, 2) = 0.10608057138220823e-1, (9, 3) = -0.8537241259630802e-2, (10, 1) = 1.6092514574255978, (10, 2) = 0.55479598742602144e-2, (10, 3) = -0.44737002335379205e-2, (11, 1) = 1.6125418345657971, (11, 2) = 0.2893322331968495e-2, (11, 3) = -0.23355264917579296e-2, (12, 1) = 1.6142608964062477, (12, 2) = 0.15052758771365673e-2, (12, 3) = -0.12157884123578575e-2, (13, 1) = 1.6151559409876364, (13, 2) = 0.7822331360649307e-3, (13, 3) = -0.6320368044368434e-3, (14, 1) = 1.6156211589498495, (14, 2) = 0.4062857014228102e-3, (14, 3) = -0.32838621353109055e-3, (15, 1) = 1.6158628400264388, (15, 2) = 0.2109074168308063e-3, (15, 3) = -0.170545763768325e-3, (16, 1) = 1.6159883120134977, (16, 2) = 0.10941637613550126e-3, (16, 3) = -0.8854477959120226e-4, (17, 1) = 1.6160533911316586, (17, 2) = 0.56721956490906675e-4, (17, 3) = -0.4596713887725025e-4, (18, 1) = 1.616087112321174, (18, 2) = 0.29365452008446224e-4, (18, 3) = -0.2386212194685309e-4, (19, 1) = 1.6161045534488754, (19, 2) = 0.1516390815449538e-4, (19, 3) = -0.12386593625953825e-4, (20, 1) = 1.6161135426663806, (20, 2) = 0.7791938637060515e-5, (20, 3) = -0.6429639956506369e-5, (21, 1) = 1.6161181444123491, (21, 2) = 0.3965292776274608e-5, (21, 3) = -0.33374881762639542e-5, (22, 1) = 1.6161204687065325, (22, 2) = 0.1978961788333754e-5, (22, 3) = -0.17324140387128301e-5, (23, 1) = 1.61612160879516, (23, 2) = 0.9498247656501698e-6, (23, 3) = -0.9008088934281642e-6, (24, 1) = 1.6161221331825066, (24, 2) = 0.41960008638368255e-6, (24, 3) = -0.47235494169304415e-6, (25, 1) = 1.616122343924887, (25, 2) = 0.1442650915773907e-6, (25, 3) = -0.249867370049047e-6, (26, 1) = 1.616122394182121, (26, 2) = .0, (26, 3) = -0.1332923050844365e-6}, datatype = float[8], order = C_order); YP := Matrix(26, 3, {(1, 1) = 1.0, (1, 2) = -.4437483631867375, (1, 3) = .0, (2, 1) = .6716037030622702, (2, 2) = -.388537166894675, (2, 3) = .12513006438547686, (3, 1) = .411915568539731, (3, 2) = -.2772636888974909, (3, 3) = .146863419900776, (4, 1) = .23766008890198692, (4, 2) = -.1740048342296656, (4, 3) = .11374991183732477, (5, 1) = .13200360213914475, (5, 2) = -.10118230657337712, (5, 3) = 0.7327839706888009e-1, (6, 1) = 0.7158430915633403e-1, (6, 2) = -0.5624459816685278e-1, (6, 3) = 0.4292286830314631e-1, (7, 1) = 0.382292301392669e-1, (7, 2) = -0.3043735342537328e-1, (7, 3) = 0.23869951970994643e-1, (8, 1) = 0.20207534170443832e-1, (8, 2) = -0.16202417731846604e-1, (8, 3) = 0.12889185162671348e-1, (9, 1) = 0.10608057138220823e-1, (9, 2) = -0.8537241259630802e-2, (9, 3) = 0.6842471348008241e-2, (10, 1) = 0.55479598742602144e-2, (10, 2) = -0.44737002335379205e-2, (10, 3) = 0.3599654310453068e-2, (11, 1) = 0.2893322331968495e-2, (11, 2) = -0.23355264917579296e-2, (11, 3) = 0.1883067086848176e-2, (12, 1) = 0.15052758771365673e-2, (12, 2) = -0.12157884123578575e-2, (12, 3) = 0.981299846186562e-3, (13, 1) = 0.7822331360649307e-3, (13, 2) = -0.6320368044368434e-3, (13, 3) = 0.5104189998045043e-3, (14, 1) = 0.4062857014228102e-3, (14, 2) = -0.32838621353109055e-3, (14, 3) = 0.2652738574441266e-3, (15, 1) = 0.2109074168308063e-3, (15, 2) = -0.170545763768325e-3, (15, 3) = 0.1377892810985819e-3, (16, 1) = 0.10941637613550126e-3, (16, 2) = -0.8854477959120226e-4, (16, 3) = 0.7154366445459707e-4, (17, 1) = 0.56721956490906675e-4, (17, 2) = -0.4596713887725025e-4, (17, 3) = 0.3714267533160009e-4, (18, 1) = 0.29365452008446224e-4, (18, 2) = -0.2386212194685309e-4, (18, 3) = 0.1928163387547276e-4, (19, 1) = 0.1516390815449538e-4, (19, 2) = -0.12386593625953825e-4, (19, 3) = 0.10009015180312396e-4, (20, 1) = 0.7791938637060515e-5, (20, 2) = -0.6429639956506369e-5, (20, 3) = 0.5195514104089411e-5, (21, 1) = 0.3965292776274608e-5, (21, 2) = -0.33374881762639542e-5, (21, 3) = 0.26968875992109285e-5, (22, 1) = 0.1978961788333754e-5, (22, 2) = -0.17324140387128301e-5, (22, 3) = 0.1399894894119178e-5, (23, 1) = 0.9498247656501698e-6, (23, 2) = -0.9008088934281642e-6, (23, 3) = 0.7279083590320563e-6, (24, 1) = 0.41960008638368255e-6, (24, 2) = -0.47235494169304415e-6, (24, 3) = 0.3816916379941305e-6, (25, 1) = 0.1442650915773907e-6, (25, 2) = -0.249867370049047e-6, (25, 3) = 0.2019081198770065e-6, (26, 1) = .0, (26, 2) = -0.1332923050844365e-6, (26, 3) = 0.1077083396095566e-6}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(26, {(1) = .0, (2) = .7740276521903071, (3) = 1.5509825989797759, (4) = 2.3308983059361585, (5) = 3.113909662707222, (6) = 3.9014225800794105, (7) = 4.693952164204047, (8) = 5.491595526837149, (9) = 6.2936856079399695, (10) = 7.098221028140669, (11) = 7.905109527264662, (12) = 8.714340235562716, (13) = 9.524617524969804, (14) = 10.335254722758192, (15) = 11.14625230894588, (16) = 11.957542794627765, (17) = 12.768893990799713, (18) = 13.580286548493516, (19) = 14.391720133302103, (20) = 15.20317024911012, (21) = 16.01462180657243, (22) = 16.8260748057475, (23) = 17.635392539683593, (24) = 18.434295256637704, (25) = 19.222354441049287, (26) = 20.0}, datatype = float[8], order = C_order); Y := Matrix(26, 3, {(1, 1) = .0, (1, 2) = .0, (1, 3) = 0.20280224164799158e-8, (2, 1) = 0.2803183042184232e-8, (2, 2) = 0.4991625955056737e-9, (2, 3) = -0.727581254546996e-9, (3, 1) = 0.4557363240240356e-8, (3, 2) = -0.3673387937871442e-8, (3, 3) = 0.22534652705375846e-8, (4, 1) = -0.6829185436526684e-9, (4, 2) = -0.35100840159303387e-9, (4, 3) = 0.5074433102697723e-9, (5, 1) = -0.15488026580064915e-8, (5, 2) = 0.8484090566812387e-9, (5, 3) = -0.6752145145589206e-9, (6, 1) = -0.4604601478218892e-9, (6, 2) = 0.890154623250492e-11, (6, 3) = 0.13709221767661697e-10, (7, 1) = -0.6102545293905585e-10, (7, 2) = -0.359282005111915e-9, (7, 3) = 0.3599498064607342e-9, (8, 1) = -0.197391568402355e-9, (8, 2) = -0.22894407799722967e-9, (8, 3) = 0.2362860013795752e-9, (9, 1) = -0.379205537675534e-9, (9, 2) = -0.4645276431659482e-10, (9, 3) = 0.56088543823463375e-10, (10, 1) = -0.4586441799614866e-9, (10, 2) = 0.38725458120158544e-10, (10, 3) = -0.314617130477522e-10, (11, 1) = -0.4635264865059751e-9, (11, 2) = 0.4950536586519704e-10, (11, 3) = -0.4553885618285106e-10, (12, 1) = -0.44282417345093263e-9, (12, 2) = 0.3285439737447645e-10, (12, 3) = -0.3110667146083322e-10, (13, 1) = -0.42268582319118604e-9, (13, 2) = 0.14947302529329693e-10, (13, 3) = -0.1408832217518466e-10, (14, 1) = -0.41044864593046706e-9, (14, 2) = 0.3808087869611605e-11, (14, 3) = -0.3002389201268037e-11, (15, 1) = -0.40506874691322416e-9, (15, 2) = -0.9736695377936347e-12, (15, 3) = 0.2018171226319354e-11, (16, 1) = -0.40362183595006497e-9, (16, 2) = -0.19677817488290347e-11, (16, 3) = 0.32115428642925657e-11, (17, 1) = -0.40378868758539834e-9, (17, 2) = -0.13624753324824084e-11, (17, 3) = 0.264529324558413e-11, (18, 1) = -0.4042910528678276e-9, (18, 2) = -0.4291900330509504e-12, (18, 3) = 0.15970666505751784e-11, (19, 1) = -0.40462961957185725e-9, (19, 2) = 0.28994823578818636e-12, (19, 3) = 0.6648002719431414e-12, (20, 1) = -0.40471401510303397e-9, (20, 2) = 0.6698102275694219e-12, (20, 3) = 0.3296256527574159e-13, (21, 1) = -0.404620155256271e-9, (21, 2) = 0.7665813776661401e-12, (21, 3) = -0.3108701481375216e-12, (22, 1) = -0.4044554481338332e-9, (22, 2) = 0.6842809730923993e-12, (22, 3) = -0.4457130232957266e-12, (23, 1) = -0.40430214896595403e-9, (23, 2) = 0.5155422812351513e-12, (23, 3) = -0.45403866728024595e-12, (24, 1) = -0.40420708479840935e-9, (24, 2) = 0.3246479611190476e-12, (24, 3) = -0.39934428675880875e-12, (25, 1) = -0.4041836916238162e-9, (25, 2) = 0.14769412605155626e-12, (25, 3) = -0.32296317050584663e-12, (26, 1) = -0.40423664955744696e-9, (26, 2) = .0, (26, 3) = -0.24728279984657615e-12}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[26] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(4.557363240240356e-9) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [3, 26, [f(x), diff(f(x), x), diff(diff(f(x), x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[26] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[26] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(3, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(26, 3, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(3, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(26, 3, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[f(x), diff(f(x), x), diff(diff(f(x), x), x)]'[i] = yout[i], i = 1 .. 3)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[26] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(4.557363240240356e-9) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [3, 26, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[26] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[26] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(3, {(1) = .0, (2) = .0, (3) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(26, 3, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(3, {(1) = 0., (2) = 0., (3) = 0.}); `dsolve/numeric/hermite`(26, 3, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 3)] end proc, (2) = Array(0..0, {}), (3) = [x, f(x), diff(f(x), x), diff(diff(f(x), x), x)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [x = res[1], seq('[f(x), diff(f(x), x), diff(diff(f(x), x), x)]'[i] = res[i+1], i = 1 .. 3)] catch: error  end try end proc

(4)

plots:-odeplot(sol, [[x, f(x)], [x, diff(f(x), x)]], x = 0 .. 20)

 

``


 

Download BVP.mw

 

1 2 3 4 5 6 7 Last Page 1 of 14