## How to correct the code for Delay Differential Equ...

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.

## Display numbers in the contour plot...

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 help with evalf...

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?

## dsolve numeric substitutions...

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

## Why Taylor series can not estimate my function in ...

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]?

 >
 > with(Student[MultivariateCalculus]):

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

## How will I use maple 2016 to solve ODEs and showin...

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

## How to use plot3d...

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

## How do I test against the specified tolerance?...

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

## why 'solve' can not obtain results...

Hi everyone.

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

Fung.mws

## How to plot the values of x and y...

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

## 3D plot of robot and Wankel engine using a single...

Maple 2016

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...

## I can not explore the error when I run this code b...

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];

## plot of dna helix using as parametric surface

Maple 2016

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

ENJOY...

## Creating Graph Equation of Water Drop Wave in...

Maple 2016

How to Create Graph Equation of Water Drop Wave in Cartesian Space using single Implicit Function only run by Maple Software

The Equation is:   z = - cos( (x2+y2)0.5 - a)  with paramater a is moving form 0 to 2pi

Enjoy...

Plese Click link below to see full equation in Maple software

Water_Drop_Wave.mw

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