Items tagged with ode ode Tagged Items Feed

I encounter "insufficient  initial/boundary value" error message,  do know how to proceed from there, search with "insufficient initial value" gets no result. Any help will be appreciated.

 

 

> restart; alias(r = r(t), f = f(t)); with(plots);
r, f
> DE := diff(r, t) = 2*r+alpha*r*f, diff(f, t) = -f+alpha*r*f;
d d
--- r = 2 r + alpha r f, --- f = -f + alpha r f
dt dt
> NULL;
> params := alpha = .3;
alpha = 0.3
> initv := r(0) = 101, f(0) = 2;
> NULL;
>
> dvars := [r, t];
> chaodisplay := proc (chartname) EQ := [op(subs(params, [DE])), initv]; EQ1 := dsolve(EQ, numeric); odeplot(EQ1, dvars, t = 0 .. 300, axes = frame, numpoints = 50000, color = green, orientation = [-30, 100], title = chartname) end proc;
Warning, `EQ` is implicitly declared local to procedure `chaodisplay`
Warning, `EQ1` is implicitly declared local to procedure `chaodisplay`
>
> chaodisplay("Rabbit and Fox");
Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem
>

Dear experts;

How can I solve this problem with maple?

restart:


 X[3](0):=6.3096*10^9;
 c:=0.67;
 d:=3.7877*10^(-8);
 delta:=3.259*d;
 lambda:=(2/3)*10^8*d;
 R[0]:=1.33;
 p:=(c*X[3](0)*delta*R[0])/(lambda*(R[0]-1));
beta:=(d*delta*c*R[0])/(lambda*p);

ode:=diff(x[1](t), t)=(lambda-d*x[1](t)-(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t)*x[3](t)),
 diff(x[2](t), t) =((1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t)*x[3](t)-delta*x[2](t)),
 diff(x[3](t), t) =((1+psi[3](t)*p*x[2](t)/A[2])*p*x[2](t)-c*x[3](t)),diff(psi[1](t), t) =-1+1/A[1]*beta^2*x[1](t)*(x[3](t))^2*(psi[1](t)-psi[2](t))^2-psi[1](t)*(-d+beta^2*(x[3](t))^2*(psi[1](t)-psi[2](t))/A[1]*x[1](t)-(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[3](t))-psi[2](t)*(-beta^2*(x[3](t))^2*(psi[1](t)-psi[2](t))/A[1]*x[1](t)+(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[3](t)),
 diff(psi[2](t), t) =1/A[2]*psi[3](t)^2*p^2*x[2](t)+psi[2](t)*delta-psi[3](t)*(psi[3](t)*p^2/A[2]*x[2](t)+(1+psi[3](t)*p*x[2](t)/A[2])*p),
 diff(psi[3](t), t) = 1/A[1]*beta^2*(x[1](t))^2*x[3](t)*(psi[1](t)-psi[2](t))^2-psi[1](t)*(beta^2*(x[1](t))^2*(psi[1](t)-psi[2](t))/A[1]*x[3](t)-(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t))-psi[2](t)*(-beta^2*(x[1](t))^2*(psi[1](t)-psi[2](t))/A[1]*x[3](t)+(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t))+psi[3](t)*c;

ics := x[1](0)=5.5556*10^7, x[2](0)=1.1111*10^7,x[3](0)=6.3096*10^9,psi[1](100)=0,psi[2](100)=0,psi[3](100)=0;

dsolve([ode, ics],numeric);?????????????????????????

Please help me

ode.mws

Minimize doesn't work with dsolve porcedure?

experiment_real.mw

tr := proc (x, y)::integer; tr := x+y; result := x^(2+y) end proc

Warning, `result` is implicitly declared local to procedure `tr`

 

tr(5, 5)

78125

(1)

with(Optimization); Minimize(tr(x, y), x = 0 .. 1000, y = 1 .. 1, initialpoint = {x = 25, y = 1})

[0.117556065072605623e-15, [x = HFloat(4.898709434833346e-6), y = HFloat(1.0)]]

(2)

xxx := 97.39391293; yyy := -1.588898710

-1.588898710

(3)

xx := 100;

3

(4)

trool := proc (leng, alpha)::integer; global psi, zx, zy, xx, yy, xxx, yyy, sa, ca, ps, Vx, Vy, vx, vy, ode, ics, XX, YY, trool, G, str, start, ds; sa := evalf(sin(alpha)); ca := evalf(cos(alpha)); ps := evalf(evalc(Im(evalc(str*(x+I*y)-((1/2)*I)*G*ln(x+I*y-start)/Pi)))); psi := ps; xxx := evalf(xx+leng*ca); yyy := evalf(yy+leng*sa); Vx := diff(psi, y); Vy := -(diff(psi, x)); vx := Re(evalf(subs(x = xxx, y = yyy, subs(vvx = Vx, vvx)))); vy := Re(evalf(subs(x = xxx, y = yyy, subs(vvy = Vy, vvy)))); proc (X) options operator, arrow; X(t) end proc; proc (Y) options operator, arrow; Y(t) end proc; zx := proc (t) options operator, arrow; evalf(subs(x = X(t), y = Y(t), subs(vvx = Vx, vvx))) end proc; zy := proc (t) options operator, arrow; evalf(subs(x = X(t), y = Y(t), subs(vvy = Vy, vvy))) end proc; ode := diff(X(t), t) = zx(t), diff(Y(t), t) = zy(t); ics := X(0) = xxx, Y(0) = yyy; ds := dsolve([ode, ics], type = numeric, [X(t), Y(t)], method = rkf45, maxfun = 0, output = listprocedure, abserr = 0.1e-3, relerr = 0.1e-3, minstep = 0.1e-1); XX := rhs(ds[2]); YY := rhs(ds[3]); trool := XX(0.1e-3) end proc:

with(Optimization); Minimize(trool(alpha, leng), assume = nonnegative, alpha = 0 .. 2*Pi, leng = .2 .. 2, iterationlimit = 1000, initialpoint = {alpha = 1, leng = 1})

Error, (in XX) parameter 'alpha' must be assigned a numeric value before obtaining a solution

 

alpha = 0 .. 2*Pi, leng = .2 .. 2, output = solutionmodule

alpha := 1; leng := 1; XX(10)

HFloat(100.54666738117751)

(5)

``

trool(1, 11)

HFloat(100.00711298362239)

(6)

psi

3.*y-11.93662073*ln((x-100.)^2+y^2)

(7)

``

 

Download experiment_real.mw

with trool procedure minimize dosent work .... and its make me realy sad, couse i need to optimize alpha and leng in other (big one) porcedure with same dsolve.

get this errors:
"Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters)"
"Error, (in XX) parameter 'alpha' must be assigned a numeric value before obtaining a solution"

I have following expression

f:=t->((1/8)*s^2*sinh(4*t)+t+(1/2)*s^2*t+s*sinh(2*t))/(1+s*cosh(2*t))

which is 1 solution of the ODE

ode2 := -(diff(y(t), t, t))+(4-12/(1+s*cosh(2*t))+(8*(-s^2+1))/(1+s*cosh(2*t))^2)*y(t) = 0

Now I wanted to construct 2 linear independent solutions via:

f1:=f(t_b-t)

f2:=f(t-t_a)

and calculate the Wronskian:

with(LinearAlgebra); with(VectorCalculus)

Determinant(Wronskian([f(t_b-t), f(t-t_a)], t))

Since I know these functions are solutions of the second order ODE which does not contain any first order derivative the Wronskian should be a constant. Unfortunately Maple has a hard time to simplify it since the epxression is a little big. Is it my fault or has anyone an idea what to do?

I have a problem in excuting this differential equation in maple it takes a long time but yet no result.

> restart;


> Delta:= epsilon[2]-epsilon[1];

> epsilon[y] := epsilon[2]-(1/4)*Delta*(1-tanh(a*y))^2;

 > z:= tanh(a*y) ;

 > ODE[4]:= diff(Y(y),y,y)- ( a/2* Delta *(1-z)*(z^2-1))/(epsilon[2]- Delta*(1-z)/4)* diff(Y(y),y)-( beta^2+ mu[0]*epsilon[y]*omega^2)*Y(y) = 0;

> dsolve(ODE[4],Y(y));

does this always occur or i do have problem with my version of maple 15, 7 and 16.

Thank you, looking forward for your answers.

 

I am trying to solve a nonlinear second order ODE with a parameter to be determined. I can set up most of the problem but I am having trouble trying to tell the computer the following boundary condition,

 

diff(f(x),x) = -K on f(x)=0.

 

(K will be inputted and is not to be solved for) As i said before, the other boundary conditions are fine and the numerical solution works if i use different boundary conditions. 

 

For other boundary conditions (for example df/dx = 0 at x=0) I write in the form 

D(f)(0)=0

 

I hope this makes sense and someone has a solution. Thanks in advance.

 

Matt

Given the following system of first order ODE,

dx/dt=0.2x(1-0.5 x)-(1.5 xy)/(1+0.116 x),

dy/dt=(1.3 xy)/(1+0.1x)-0.8y.

 

Draw a DEplot (for t from 0 to 50) and indicate the particular

trajectory with the initial conditions x(0)=1,y(0)=2. If I

switched to forward Euler method,what would the DE plot look

like then? Is it possible to make the plot made by the

forward Euler method look close to the one which used the

default method?

As it says in the title, I would like to solve the following ODE numerically using forward Euler method, without using the Student Package.

 

(dy(t))/(dt)=t(1-0.3t)-(ty)(1+0.6t)

with initial condition y(0)=1. I want to solve it for up to t=1, and then plot both the solution by Euler's method and the solution by "dsolve" on the same graph so I can compare them.

 

Also, can I make a separate DEplot with t extending to 5?

 

Thanks in advance.

Following previous question at

http://www.mapleprimes.com/questions/149581-Improve-Algorithm-Dsolve

and also

http://www.mapleprimes.com/questions/149243-BVP-With-Constraining-Integrals

I wrote the following code

***********************

restart:

gama1:=0:


phi0:=0.00789:


rhocu:=2/(1-zet^2)*int((1-eta)*rho(eta)*c(eta)*u(eta),eta=0..1-zet):

eq1:=diff(u(eta),eta,eta)+1/(mu(eta)/mu1[w])+((1/(eta-1)+1/mu(eta)*(mu_phi*diff(phi(eta),eta)))*diff(u(eta),eta)):
eq2:=diff(T(eta),eta,eta)+1/(k(eta)/k1[w])*(2/(1-zet^2)*rho(eta)*c(eta)*u(eta)/(p2*10000)+( (a[k1]+2*b[k1]*phi(eta))/(1+a[k1]*phi1[w]+b[k1]*phi1[w]^2)*diff(phi(eta),eta)-k(eta)/k1[w]/(1-eta)*diff(T(eta),eta) )):
eq3:=diff(phi(eta),eta)-phi(eta)/(N[bt]*(1-gama1*T(eta))^2)*diff(T(eta),eta):
mu:=unapply(mu1[bf]*(1+a[mu1]*phi(eta)+b[mu1]*phi(eta)^2),eta):
k:=unapply(k1[bf]*(1+a[k1]*phi(eta)+b[k1]*phi(eta)^2),eta):
rhop:=3880:
rhobf:=998.2:
cp:=773:
cbf:=4182:
rho:=unapply(  phi(eta)*rhop+(1-phi(eta))*rhobf ,eta):
c:=unapply(  (phi(eta)*rhop*cp+(1-phi(eta))*rhobf*cbf )/rho(eta) ,eta):
mu_phi:=mu1[bf]*(a[mu1]+2*b[mu1]*phi(eta)):

a[mu1]:=39.11:
b[mu1]:=533.9:
mu1[bf]:=9.93/10000:
a[k1]:=7.47:
b[k1]:=0:
k1[bf]:=0.597:
zet:=0.5:
#phi(0):=1:
#u(0):=0:
phi1[w]:=phi0:
N[bt]:=0.2:
mu1[w]:=mu(0):
k1[w]:=k(0):

eq1:=subs(phi(0)=phi0,u(0)=0,eq1):
eq2:=subs(phi(0)=phi0,u(0)=0,eq2):
eq3:=subs(phi(0)=phi0,u(0)=0,eq3):

p:=proc(pp2) global res,F0,F1,F2:
if not type([pp2],list(numeric)) then return 'procname(_passed)' end if:
res := dsolve({eq1=0,subs(p2=pp2,eq2)=0,eq3=0,u(0)=0,u(1-zet)=0,phi(0)=phi0,T(0)=0,D(T)(0)=1}, numeric,output=listprocedure):
F0,F1,F2:=op(subs(res,[u(eta),phi(eta),T(eta)])):
evalf(2/(1-zet^2)*Int((1-eta)*(F1(eta)*rhop+(1-F1(eta))*rhobf)*( F1(eta)*rhop*cp+(1-F1(eta))*rhobf*cbf )/(F1(eta)*rhop+(1-F1(eta))*rhobf)*F0(eta),eta=0..1-zet))-pp2*10000:
end proc:


s1:=Student:-NumericalAnalysis:-Secant(p(pp2),pp2=[6,7],tolerance=1e-6);

                   HFloat(6.600456858832996)

p2:=%:



ruu:=evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet))):
phb:=evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta)*F1(eta),eta=0..1-zet))) / evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet))) :
TTb:=evalf(2/(1-zet^2)*(Int((1-eta)*F2(eta),eta=0..1-zet))):
rhouu:=evalf(2/(1-zet^2)*(Int((1-eta)*(F1(eta)*rhop+(1-F1(eta))*rhobf)*F0(eta),eta=0..1-zet))):
with(plots):
res(parameters=[R0,R1]):
odeplot(res,[[eta,u(eta)/ruu],[eta,phi(eta)/phb],[eta,T(eta)/TTb]],0..zet);

 

*************************************

as you can see at the second line of the code, the value of phi0:=0.00789. however, I want to modify the code in a way that phi0 is calculated with the following addition constraint

evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta)*F1(eta),eta=0..1-zet))) / evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet)))-0.02=0

I would be most grateful if you could help me in this problem.

Thanks for your attention in advance

Amir

Here is a screen of the original question  http://www.mapleprimes.com/ViewTemp.ashx?f=21095_1385385286/screen25.11.13.docx

 My advice to the questioner is to visit a psychiatrist ASAP.

Markiyan Hirnyk

 

Thank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank youThank you

So i have to plot 3 ODEs. How would I go about plotting dx/dt=10(y-x) AND dy/dt=x(28-x)-y AND dz/dt= xy-8z/3. Any help at all would be appreciated.

The question is to solve

x^2*(diff(y(x), x, x))+x^3*(diff(y(x), x))+(x^2-2)*y(x) = 0

and evaluate it where y(1) = 1 and y(2) = 2 to find y(3).

 

When I do the equation,

 

ODE := x^2*(diff(y(x), x, x))+x^3*(diff(y(x), x))+(x^2-2)*y(x) = 0

dsolve(ODE) y(x) = _C1/x+_C2*(-sqrt(Pi)*sqrt(2)*erf((1/2)*sqrt(2)*x)+2*x*exp(-(1/2)*x^2))/x

 

I have gotten an erf. Is this correct?

Hi -

I'm trying to use Maple to integrate an ODE numerically, but to output the integration steps as I go (in an array, or similar). None of the dsolve/numeric output parameters appear to offer this (ie

x=0.00 f = whatever,

x = 0.05 f = whatever2,

x = 0.10 f = whatever3)

Is there a standard feature in Maple that I'm missing, or would I have to force the output from the dsolve procedure in some way, please?

I have 2nd order nonlinear ode I try to solve with Runge Kutta 4th order method in maple but all I get from the outcome was 1 and 0.This is the equation:theta_ode1.mw . How do I do it Or how do I write the code to solve it with maple using  Runge Kutta 4th order method?

I have 2nd order nonlinear ode I try to solve with Runge Kutta 4th order method in maple but all I get from the out is 1 and 0.This is the equation: theta_ode.mw . How do I do it Or how do I write the code to solve it with maple using  Runge Kutta 4th order method?

4 5 6 7 8 9 10 Last Page 6 of 19