Items tagged with ivp ivp Tagged Items Feed

Hi, I have a homework to do that I am strugling with:

write a procedure which uses euler's method to solve a given initial value problem.
the imput should be the differential equation and the initial value.
using this programme find y(1) if dy/dx= x^2*y^3 and y(0)=1, and use maple dsolve command to check the solution.

That is what I have managed to do, but somehow it is not working correctelly, can somebody help please?

eul:=proc(f,h,x0,y0,xn)
  local no_points,x_old,x_new,y_old,y_new,i:
  no_points:=round(evalf((xn-x0)/h)):
  x_old:=x0:
  y_old:=y0:
 
  for i from 1 to no_points do
      x_new:=x_old+h:
      y_new:=y_old+evalf(h*f(x_old,y_old)):
      x_old:=x_new:
      y_old:=y_new:
  od:
  y_new:
end:


Thanks

I am stuck with an IVP which is

eq1:=diff(y(x),x$2)+2/x*(diff(y(x),x))+y^M=0;

ic:=y(0)=a,D(y)(0)=0;

its quite easy to find the series solution of the ode 

dsolve({eq1, ic}, y(x), series);

y(x)=a-(1/6)*exp(M*ln(a))*x^2+(1/120)*(exp(M*ln(a)))^2*M*x^4/a;

But I am facing problem when I try to solve it numerically,

dsolve(subs(a=1,M=3,{eq1,ic}),numeric);

THanks

Hello everyone,

I am dealing with an Eigen value problem, the equations are

restart:with(plots):

Eq1:=diff(f(y),y$2)-a^2*f(y)+a*(h(y)+R*q(y))=0;

Eq2:=diff(h(y),y$2)-a^2*h(y)+a*Z*y*f(y)=0;

Eq3:=diff(q(y),y$2)-a^2*q(y)+a*f(y)=0;

ic:=f(0)=0,f(1)=0,D(h)(0)=0,q(0)=0,h(1)=0,q(1)=0;

where f,h,q are Eigen functions, R, Z are dimensionless...

Hi,

I've been trying to manipulate the equations of a mechanism that I've exported from MapleSIM.  The system equations contain 4 differential ordinary equations, and 6 algebraic equations.  In MapleSIM it simulates fine, but I'm having problems simulating it in maple alone (without multibody exports).

I've tried solving the initial value problem by replacing all the time dependant variables with constants, (and as this is a dynamics problem) I supplied...

 d^2(x)/d(t^2) + sin(x)=0  (1)

d^2(x)/d(t^2) + x = 0 (2)

d^2(x)/d(t^2) + ( x - (x)^3/6) = 0 (3)

1) Compare the results of numerical simulations of (1), (2), (3) to see how closely the period of the periodic orbits relate.

a) Perform a phase portrait ( (x)'(t) vs. x ) analysis for (1), (2), and (3).

b) Consider the initial conditions x(0)= x0 and x'(0)=0. For what intervals of x0 do the periodic orbits of (2...

The system of ODEs i am trying to analyse is just a 3d model of a ball in motion with gravity and air resistence acting upon it.

restart;

with(plots):

eq1 := diff(x(t), t, t) = -k*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2)^(n-1)*(diff(x(t), t))

eq2 := diff(y(t), t, t) = k*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2)^(n-1)*(diff(y(t), t))

eq3 := diff(z(t), t, t) = -g-k*sqrt((diff(x(t), t))^2+(diff(y(t), t...

Hi, I am trying to plot a solution curve on a vector field with an initial condition of y(0)=0 and I keep getting error messages. This is what I have so far:

 

with(DEtools); dfieldplot(diff(y(x), x) = x^2+y(x)^2-1, y(x), x = 0 .. 5, y = -1 .. 5, arrows = line, title = 'Slope*Field');

 

Thank you. 

I am writing a procedure that takes the "output" of a call to dsolve (with the options numeric and listprocedure and without specifying a range of integration) as an argument ('dsol') together with a minimally acceptable range of integration ('tf'). The output of the procedure is either the input 'dsol' itself, if dsolve has been able to integrate from 0 to 'tf', or a modified version where the initial conditions have been modified.

Say I want to integrate an ode system [u,v,w...

Hi,

I've figured out several ways to accomplish this, using a series of commands, but is it possible using only dsolve to solve a first-order ivp involving two constants: the constant of integration and a constant of proportionality. For example, the type that arise using Newton's basic law of heating/cooling:

y'(t) = k*(y(t)-10), y(0)=70, y(1/2)=50

I welcome all ideas, especially if there is something easy I'm missing, thanks! 

Firstly, I need solve q(t) by the following procedure:

u := 8.53;
dsys0:={diff(q(t), `$`(t, 2)) = u*(1 - q(t)*q(t)) * diff(q(t), `$`(t, 1)) - q(t), q(0) = 0, D(q)(0) = 1};
dsol0:=dsolve(dsys0,numeric,method=rkf45,abserr=10^(-10),relerr=10^(-16),range=0..6,maxfun=0,output=listprocedure);
yy0:= eval(q(t), dsol0);

Furthermore, I need substitute q(t) into two second order differential equations for solving yy10 and yy01. The procedure is

Dear guys, Can anyone tell me why my program does not work for some initial values? All my equations are:

> alpha := (6*h^2)^(1-n)*(1-k)^(1-n)*((1-m+k)/(2*n-1-k));

> eq := z-> 1=(m*(1+z)^3-k*(1+z)^2)*h^2/(H^2)+(((2*n-1)-(k*(1+z)^2*h^2/H^2))*((1-m+k)/(2*n-1+k))*((((H^2/h^2)-k*(1+z)^2)/(1-k))^(n-1)));

> Y := z->if not type(z,numeric) then 'procname(z)' else (fsolve(eq(z), H=h)) end if;

> l := dsolve({D(L)(z) = L(z)/(1+z)+(1+z...

Hi,

I have what I hope is an easy problem to answer. How would one go about having Maple solve a "vectorized" initial-value problem. For example,

 y'(t) =[t^2,exp(t)], y(0)=[-1,1]. Find y(t).

 Thanks!

Page 1 of 1