Maple 2016 Questions and Posts

These are Posts and Questions associated with the product, Maple 2016

Hi

How we can reduce run time for Cases III and IV ? (Maple 2016)

Thanks alot

Formula_II.mw

Good day, all.

Please I want to solve the following delay differential equation:

ODE := diff(y(t), t$2) = (2*(1-y(t-1)^2))*(diff(y(t), t))-y(t)

ics := y(0) = 1, (D(y))(0) = 0

using the following codes but there is an error. Please kindly help to modify the codes.

restart;
Digits:=30:

f:=proc(n)
	2*(1-(y[n-1])^2)*delta[n]+y[n]:
end proc:

g:=proc(n)
	-4*y[n-1]*delta[n-1]+2*(1-(y[n-1])^2)*f(n)-delta[n]:
end proc:


e1:=y[n+2] = -y[n]+2*y[n+1]+(1/120)*h^2*(-3*h*g(n+2)+3*g(n)*h+16*f(n+2)+16*f(n)+88*f(n+1)):
e2:=h*delta[n] = -y[n]+y[n+1]-(1/1680)*h^2*(-128*h*g(n+1)-11*h*g(n+2)+59*g(n)*h+40*f(n+2)+520*f(n)+280*f(n+1)):
e3:=h*delta[n+1] = -y[n]+y[n+1]+(1/1680)*h^2*(-152*h*g(n+1)-10*h*g(n+2)+32*g(n)*h+37*f(n+2)+187*f(n)+616*f(n+1)):
e4:=h*delta[n+2] = -y[n]+y[n+1]+(1/1680)*h^2*(128*h*g(n+1)-101*h*g(n+2)+53*g(n)*h+744*f(n+2)+264*f(n)+1512*f(n+1)):

inx:=0:
ind:=0:
iny:=1:
h:=1/2:
n:=1:
omega:=10:
u:=omega*h:
N:=solve(h*p = 10, p):

err := Vector(round(N)):
exy_lst := Vector(round(N)):
numerical_y1:=Vector(round(N)):

c:=1:
for j from 0 to 2 do
	t[j]:=inx+j*h:
end do:

vars:=y[n+1],y[n+2],delta[n+1],delta[n+2]:

step := [seq](eval(x, x=c*h), c=1..N):
printf("%6s%45s%45s\n", 
	"h","Num.y","Num.z");
#eval(<vars>, solve({e||(1..4)},{vars}));


st := time():
for k from 1 to N/2 do

	par1:=x[0]=t[0],x[1]=t[1],x[2]=t[2]:
	par2:=y[n]=iny,delta[n]=ind:
	res:=eval(<vars>, fsolve(eval({e||(1..4)},[par1,par2]), {vars}));

	for i from 1 to 2 do
		printf("%6.5f%45.30f%45.30f\n", 
		h*c,res[i],res[i+2]):
		
		numerical_y1[c] := res[i]:
		
		c:=c+1:
	end do:
	iny:=res[2]:
	ind:=res[4]:
	inx:=t[2]:
	for j from 0 to 2 do
		t[j]:=inx + j*h:
	end do:
end do:
v:=time() - st;
v/4;
printf("Maximum error is %.13g\n", max(err));
NFE=evalf((N/4*3)+1);
#get array of numerical and exact solutions for y1
numerical_array_y1 := [seq(numerical_y1[i], i = 1 .. N)]:
#exact_array_y1 := [seq(exy[i], i = 1 .. N)]:

#get array of time steps
time_t := [seq](step[i], i = 1 .. N):

#display graphs for y1
with(plots):
numerical_plot_y1 := plot(time_t, numerical_array_y1, style = [point], symbol = [asterisk],
				color = [blue,blue],symbolsize = 20, legend = ["TFIBF"]);

 Thank you, and best regards.

How can numbers be displayed inside the contour plot?

 restart;
with(plots);
contourplot(x*exp(-x^2 - y^2), x = -2 .. 2, y = -2 .. 2, axes = boxed);
like this

I need admin's help
I use evalf(3*21/100,3)=0.630
and evalf(3*89/100,3)=2.67
Is there a way for me to get 2 decimal places
so evalf(3*21/100,3)=0.63?

Good day everyone,

I am writing a numerical code using dsolve which works fine but I have a challenge in inputting the previous answers in the subsequent ones. For example, how can I substitute the solutions in S1 into equ11, equ22, equ33, and equ44 in the link below? 

Thank you very much as I will be expecting responses from you soon.

New.mw

I want to express my two variable function f using Taylor expansion. But no success yet.

Why Taylor series can not estimate my function in desired interval [-1<x,y<1]?

restart

with(Student[MultivariateCalculus]):

 

f := -5023626067733175609651265492842895195168362165*xx^5*yy^9*(1/5575186299632655785383929568162090376495104)+2207379816207475241162406248223006569040862935*xx^5*yy^8*(1/2787593149816327892691964784081045188247552)+5795161625895678368156852916105373987594511979*xx^6*(1/22300745198530623141535718272648361505980416)-539977758872163289054492124375185771143918033*xx^6*yy*(1/696898287454081973172991196020261297061888)+782685832362921584689673760969891945953777553*xx^6*yy^2*(1/5575186299632655785383929568162090376495104)+749877940244270735637721966049124917356845885*xx^6*yy^3*(1/174224571863520493293247799005065324265472)+14159347676475748959036290080103848146860867025*xx^6*yy^4*(1/11150372599265311570767859136324180752990208)-2937701213452088192123555543440803264914467299*xx^6*yy^5*(1/348449143727040986586495598010130648530944)-23673134207774883972271882396704370580007933039*xx^6*yy^6*(1/5575186299632655785383929568162090376495104)-62755544772437504320590342390381422715234113715/89202980794122492566142873090593446023921664+35696532930567486560276536615522532283474689213*yy*(1/2787593149816327892691964784081045188247552)+43423414494451507811145033075147441881593811799*yy^2*(1/22300745198530623141535718272648361505980416)+1173296429365947392287371443632107462978009165*xx^6*yy^7*(1/174224571863520493293247799005065324265472)-56566850002827011453690682806041619180254985625*yy^3*(1/696898287454081973172991196020261297061888)+57447439083834576362467553225131370438848237035*xx^6*yy^8*(1/22300745198530623141535718272648361505980416)-1277356081222180962342283013232991241852904465*xx^6*yy^9*(1/696898287454081973172991196020261297061888)-29946355461657315300256240552185966952551471*xx^7*(1/1393796574908163946345982392040522594123776)+998213736763384913910074759047227544847506773*xx^7*yy*(1/11150372599265311570767859136324180752990208)-2038600361316622246653155899145012259420048867785*yy^4*(1/44601490397061246283071436545296723011960832)+10578825782023300845453772557509072093336001*xx^7*yy^2*(1/43556142965880123323311949751266331066368)-4303517165264733669855129139552505045324631645*xx^7*yy^3*(1/11150372599265311570767859136324180752990208)-652299342907430898149182084981866414949696905*xx^7*yy^4*(1/696898287454081973172991196020261297061888)+11170081785792631086653879206603595320491089331*xx^7*yy^5*(1/11150372599265311570767859136324180752990208)+116540829629507365267125159526451609264014215*xx^7*yy^6*(1/87112285931760246646623899502532662132736)+211134394987302797546644924545169826774270265159*yy^5*(1/1393796574908163946345982392040522594123776)-14785537121406447202257499440081382142298519099*xx^7*yy^7*(1/11150372599265311570767859136324180752990208)+1970986683407627074325019523003479974617451789943*yy^6*(1/22300745198530623141535718272648361505980416)-868641325364973493898126340263842300348545855*xx^7*yy^8*(1/1393796574908163946345982392040522594123776)+216255546256559295251079313253452049445763455*xx^7*yy^9*(1/348449143727040986586495598010130648530944)-4089215965643055747590786827106386135115380275*xx^8*(1/89202980794122492566142873090593446023921664)+1869246621670048362557342074310025153518449965*xx^8*yy*(1/2787593149816327892691964784081045188247552)+18712604797880071317805036942199122521197359575*xx^8*yy^2*(1/22300745198530623141535718272648361505980416)-3479476522267890993628796487849129439635143625*xx^8*yy^3*(1/696898287454081973172991196020261297061888)-77131555128675321096947207038878222843991869993*yy^7*(1/696898287454081973172991196020261297061888)-206512033439850904054937113093163624192322042825*xx^8*yy^4*(1/44601490397061246283071436545296723011960832)+15350689937843699961175740256400109996121380375*xx^8*yy^5*(1/1393796574908163946345982392040522594123776)+157001869330425518481531763580902779395436599415*xx^8*yy^6*(1/22300745198530623141535718272648361505980416)-6686861200533386632065997818427854246215113305*xx^8*yy^7*(1/696898287454081973172991196020261297061888)-3917684154726736823398471536296978037714283086195*yy^8*(1/89202980794122492566142873090593446023921664)-285743684916570536194588196441080828723328178675*xx^8*yy^8*(1/89202980794122492566142873090593446023921664)+8094790880015327525694605814920739418439287725*xx^8*yy^9*(1/2787593149816327892691964784081045188247552)+30423874459994412977383604476886160940746185*xx^9*(1/5575186299632655785383929568162090376495104)-1197236208181378637639504269592639035279087665*xx^9*yy*(1/44601490397061246283071436545296723011960832)-72716798311978341010558827315982986191821905*xx^9*yy^2*(1/696898287454081973172991196020261297061888)+5138909461003175489938484170634052266819688725*xx^9*yy^3*(1/44601490397061246283071436545296723011960832)+1206817075246069632318716986669541278160772775*xx^9*yy^4*(1/2787593149816327892691964784081045188247552)-12993287722661922638788467553649639108437064835*xx^9*yy^5*(1/44601490397061246283071436545296723011960832)-431284328058774504067793959976795724976545555*xx^9*yy^6*(1/696898287454081973172991196020261297061888)+17639360745426635511855086638766468926126459875*xx^9*yy^7*(1/44601490397061246283071436545296723011960832)-2146702909675882809503682033933399905335826325*xx^9*yy^9*(1/11150372599265311570767859136324180752990208)+1587967252519403636411870604735180043125989625*xx^9*yy^8*(1/5575186299632655785383929568162090376495104)+76828297887427851822683521168415270943435162685*yy^9*(1/2787593149816327892691964784081045188247552)+220816865194317615868568855814620996552449073*xx*(1/5575186299632655785383929568162090376495104)-9205355621994819342146712860571987786619361601*xx*yy*(1/44601490397061246283071436545296723011960832)-104255809907916433055923335622932126645726549*xx*yy^2*(1/696898287454081973172991196020261297061888)+27484692689867334306687311759874973819976026005*xx*yy^3*(1/44601490397061246283071436545296723011960832)+1583056855557692418384969876461998197073089695*xx*yy^4*(1/2787593149816327892691964784081045188247552)-36304948749180317956941914133403396762716230691*xx*yy^5*(1/44601490397061246283071436545296723011960832)-590212436135125327923049635849260481403670583*xx*yy^6*(1/696898287454081973172991196020261297061888)+27046038795224386955728969793334632924015008227*xx*yy^7*(1/44601490397061246283071436545296723011960832)+2168816628024980374461014350770096009019357665*xx*yy^8*(1/5575186299632655785383929568162090376495104)-2255097230860381206152749351617455809672044745*xx*yy^9*(1/11150372599265311570767859136324180752990208)+35122173917479363738100862234581108137514304171*xx^2*(1/22300745198530623141535718272648361505980416)-17449701902039745490242163912540688306429882361*xx^2*yy*(1/696898287454081973172991196020261297061888)-11540959773500599403794316292492996114189538863*xx^2*yy^2*(1/5575186299632655785383929568162090376495104)+27287439738914744607616926917914225474665410565*xx^2*yy^3*(1/174224571863520493293247799005065324265472)+929769947314964740179937673332890647768037984465*xx^2*yy^4*(1/11150372599265311570767859136324180752990208)-100809382380090436397261413740272360141145204891*xx^2*yy^5*(1/348449143727040986586495598010130648530944)-930314746723434588666177195703059675161177190255*xx^2*yy^6*(1/5575186299632655785383929568162090376495104)+36390552938954376406834468187448925576623439893*xx^2*yy^7*(1/174224571863520493293247799005065324265472)+1872760743346397986120124413411813119412045269675*xx^2*yy^8*(1/22300745198530623141535718272648361505980416)-35643509355104072817665294345590475660747146425*xx^2*yy^9*(1/696898287454081973172991196020261297061888)-125283292999146417157156696376640452081866835*xx^3*(1/1393796574908163946345982392040522594123776)+5011420945327438626354964312196465908094234685*xx^3*yy*(1/11150372599265311570767859136324180752990208)+29341459645317546529685572705520876577051855*xx^3*yy^2*(1/87112285931760246646623899502532662132736)-15637727799880882327290754576104647826715168925*xx^3*yy^3*(1/11150372599265311570767859136324180752990208)-851688199122087410134053760306093104684621525*xx^3*yy^4*(1/696898287454081973172991196020261297061888)+23458516464006675395891679247259419002768896835*xx^3*yy^5*(1/11150372599265311570767859136324180752990208)+39584968580329795728950940517214770307434335*xx^3*yy^6*(1/21778071482940061661655974875633165533184)-20361225581568567923686744589522827658576624955*xx^3*yy^7*(1/11150372599265311570767859136324180752990208)-1174244552874873223035231031480900497934023075*xx^3*yy^8*(1/1393796574908163946345982392040522594123776)+941109349474535911451616661821106567867537125*xx^3*yy^9*(1/1393796574908163946345982392040522594123776)-48412290717709997717153300332089796247538326265*xx^4*(1/44601490397061246283071436545296723011960832)+17196469545705046799299985950707233685621881055*xx^4*yy*(1/1393796574908163946345982392040522594123776)-9551461763890264957289963973620923748598225435*xx^4*yy^2*(1/11150372599265311570767859136324180752990208)-26051472095770585704126329008135447818638784275*xx^4*yy^3*(1/348449143727040986586495598010130648530944)-765302392604646459013613426858243443467023490875*xx^4*yy^4*(1/22300745198530623141535718272648361505980416)+94251624724512021502035994822030873708141367565*xx^4*yy^5*(1/696898287454081973172991196020261297061888)+843981485493394825713526892530506348990296828805*xx^4*yy^6*(1/11150372599265311570767859136324180752990208)-33218490572036542393092937176469859040906121155*xx^4*yy^7*(1/348449143727040986586495598010130648530944)-1758702445038817232726176779731884586549332868025*xx^4*yy^8*(1/44601490397061246283071436545296723011960832)+31380186488931551370058361496245928395816772575*xx^4*yy^9*(1/1393796574908163946345982392040522594123776)+184838927094446995029201369223921105703104647*xx^5*(1/2787593149816327892691964784081045188247552)-6817973449093402642853212701104432585928821163*xx^5*yy*(1/22300745198530623141535718272648361505980416)-113510140727511300460098712979462156361337425*xx^5*yy^2*(1/348449143727040986586495598010130648530944)+23570688854853763073042723518782612790921757535*xx^5*yy^3*(1/22300745198530623141535718272648361505980416)+1613038118657167505912389296857854524947676825*xx^5*yy^4*(1/1393796574908163946345982392040522594123776)-44608078263668464626393951292252447406629869273*xx^5*yy^5*(1/22300745198530623141535718272648361505980416)-588774433706353379897742534304221654039246663*xx^5*yy^6*(1/348449143727040986586495598010130648530944)+47950825635610780986659544491454706340397108297*xx^5*yy^7*(1/22300745198530623141535718272648361505980416):

g := .5*(1+tanh(f)):

plot3d(g, xx = -1 .. 1, yy = -1 .. 1, color = red, style = surface)

 

 

h := Student:-MultivariateCalculus:-TaylorApproximation(g, [xx, yy] = [0, 0], 35):

plot3d(h, xx = -1 .. 1, yy = -1 .. 1, color = red, style = surface)

 

 

Download taylorProblem.mw

How will I use maple 2016 to solve ODEs and showing the steps involved because this will increase my understanding in it. 

Dear Colleagues,

I wish to use plot3d to the attached code but always encoutered error. However, pointplot3d runs perfectly. Please I need your assistance in this regards.

Thank you all and best regards.K2_Problem_2_two_body_kepler_e=0.mw

Good day everyone.

I am trying to write a code with variable stepsize involving tolerance. two vectors are declare for the errors. However, I don't know how to declare the two errors in comparison with the tolerance. Please kindly help. Also, any other modification to the entire code is also welcomed. Thank you all and best regards.

The code is as attached.

Variable_step_size_Falkner.mw

Hi everyone.

Could you please help me to obtain the results by 'solve'?

Is there any way such as numerical methods in this regard?

Fung.mws

Good day everyone, 

How can I extract the values of x and y for plotting? 

The worksheet is attached below. Thanks

dont_get_it.mw

TODAY I GOT AN INSPIRATION TO CREATE 3D GRAPH EQUATION OF WALKING ROBOT (ED-209) IN CARTESIAN SPACE USING ONLY WITH SINGLE IMPLICIT EQUATION.

ENJOY...

 

How to Create Graph Equation of Wankel Engine on Cartesian Plane using Single Implicit Function run by Maple Software

Enjoy...

 

restart;

Frac_C := proc (expr, a, t, alpha) local ig, m, tau;

m := ceil(alpha);

ig := (t-tau)^(m-alpha-1)*(diff(eval(expr, t = tau), tau$m));

`assuming`([(int(ig, tau = a .. t))/GAMMA(m-alpha)], [a < t]);

end proc;
r := .5;

k := .7;

eq1 := Frac_C(x, 0, t, r)-y(t) = 0;

eq2 := Frac_C(y, 0, t, k)-x(t)-2*t = 0;

eq3 := x(0)-y(1) = 0;

eq4 := Frac_C(x, 0, t, r)-(eval(diff(y(x), x), x = 1)) = 0;

eq5 := Frac_C(x, 0, t, r)-(eval(diff(y(x), x, x), x = 1)) = 0;

eq6 := eval(diff(y(x), x), x = 0)-x(1)-2 = 0;

eq7 := y(0) = 0;

N := 5;

x[c] := [seq(a[i], i = 0 .. N)];

y[c] := [seq(b[i], i = 0 .. N)];

for n to N do

subs([seq(x(i) = x[c][i], i = 0 .. n), seq(y(i) = y[c][i], i = 0 .. n)], {eq1, eq2, eq3, eq4, eq5, eq6, eq7});
soln := solve({eq3, eq4, eq5, eq6, eq7, seq(coeff(lhs(eq), t, j) = 0, eq in {eq1, eq2})}, {a[n+1], b[n+1]});

x[c][n+1] := eval(a[n+1], soln);

y[c][n+1] := eval(b[n+1], soln);

end do;

x[s] := add(x[c][i]*t^(i-1), i = 1 .. N+1);

y[s] := add(y[c][i]*t^(i-1), i = 1 .. N+1);

x[s];

y[s];

CREATING GRAPH EQUATION OF "DNA" IN CARTESIAN SPACE USING PARAMETRIC SURFACE EQUATION RUN ON MAPLE SOFTWARE

ENJOY...

 

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