Items tagged with ivp ivp Tagged Items Feed

I've got the following four differential equations :

d2v_x:=-((C_d)*rho*Pi*(r^2)*(v_x)*sqrt((v_x)^2 +(v_y)^2))/(2*m);
d2v_y:=-((C_d)*rho*Pi*(r^2)*(v_y)*sqrt((v_x)^2 +(v_y)^2))/(2*m)-g;

and the following initial value conditions:

x(0)=0,y(0)=0,v_x(0)=v0/sqrt(2),v_y(0)=v0/sqrt(2) given v0=65 

I need to solve these using the numeric type and then draw overlaid plots

(i) setting C_d=0

(ii) leaving C_d as a variable

before plotting y(t) vs x(t). The hint for this last part is that the path can be seeing using [x(t),y(t)] instead of [t,y(t)]

I've tried to do it but seemed to have several syntax errors.



I've got the following diff.eq

y'(x)=sin(x*y(x)) given y(0)=1 

and need to solve it numerically which is why I've used:


This code doesn't return a value though and in fact, ans3 is being displayed as a procedure

"ans3:=proc(x_rkf45) ... end proc"

I don't quite understand why and what I need to do to get the required numerical solution


Solve IVP with complex coef. with compplex varables numerically..

the sys. is x'=-iDelta1x(t)+y(t)+epsilon


z'=-2(x*(t)y(t)+x(t)y*(t)), where * means complex conjugate 

I solve it as:


dsys :={diff(x(t),t)=-I*Delta1*x(t)+y(t)+epsilon, diff(y(t),t)=-I*Delta2*y(t)+x(t)*z(t), diff(z(t),t)=-2*(conjugate(x(t))*y(t)+conjugate(y(t))*x(t))}:
functions := indets(dsys, anyfunc(identical(t))):
redefinitions := map(f -> f = cat(op(0, f), _R)(t) + I*cat(op(0,f), _I)(t), functions):
newsys := map(evalc @ Re, redefinitions) union map(evalc @ Im, redefinitions):

incs := {x_R(0)=0, x_I(0)=0, y_R(0)=0, y_I(0)=0,z_R(0)=-1/2, z_I(0)=0}:
dsol1 :=dsolve({newsys,incs},var,numeric, output=listprocedure, abserr=1e-9, relerr=1e-8,range=0..1):

but it seems there is not runing propebly


Hallo. I'm solving a initial value problem for system of 7 ODE:

dsn := dsolve({expand(maineq[1, 1]), expand(maineq[1, 2]), expand(maineq[1, 3]), expand(maineq[1, 4]), expand(maineq[1, 5]), expand(maineq[1, 6]), expand(maineq[1, 7]), T(0) = .5, u(0) = u0, Y[1](0) = .8, Y[2](0) = .2, Y[3](0) = 0, Y[4](0) = 0, Y[5](0) = 0}, numeric, method = lsode[backfull])


Is there easy way how to plot result?




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?

  local no_points,x_old,x_new,y_old,y_new,i:
  for i from 1 to no_points do


I am stuck with an IVP which is



its quite easy to find the series solution of the ode 

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


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



Hello everyone,

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






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


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.



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


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

1 2 Page 1 of 2