Items tagged with ivp

Trying to solve this IVP of the SHO  (second order linear costant-coefficient).

Everything works fine until I come to the solving even after using dsolve with initial conditions (even using the differential operator D in the initial conditions)  , the answer still contains _C1, an unknown constant.

The full worksheet is below.  The code for dsolve is:

sol3 := dsolve(subs(par1, {de1, D(x)*0 = 0, x(0) = 1}), x(t));

 

Hoping you can help with a solution.

 

 

 

 

DEAR SIR,

PLEASE HELP ME WITH THAT QUESTION

Hi

Dear friends

I use the command "dsolve(`union`(deq, initial), numeric, method = lsode)" for solving a fourth order ODE.

But for some numerical values of the parameters the bellow error is occurred:

" an excessive amount of work (greater than mxstep) was done ".

I have three questions:

1- how can I increase the mxstep from default amount (i.e. 500) to a greater value?

2- how can I ensure that the absolute error is less than 10E-6?

3- when I use lsode which way of numerical solution is applied (Euler,midpoint, rk3, rk4, rkf, heun, ... )?

 

Thanks a lot for your help

Hi everyone, I'm a new one to Maple. I've just learnt some basic tools :)

 

This is my task. I tried to record in Maple but I had errors. I don't know why I had problems but I hope you will help me and I will do it.

tkanks

PLEASE HELP ME. I NEED HELP REALLY BAD.

Restrict calculation to real numbers.

Using y' = u, express the oscillator equation: y" + 3y' + 2y = cos(t) as a first order system. 

Plot an approximate solution curve for the specified initial conditions.

[x0=5, y0=1],[x0=-2, y0=-4],[x0=0, y0=.1],

This is what i have so far but i am not sure if its correct.

Eulers modified method: 

with(RealDomain);

x[0] := 0;

y[0] := 5;

t[0]=0

h := .1;

for n to 100 do

x[n] := x[n-1]+h*(x[n-1]+y[n-1]);

k1 := x[n-1]+y[n-1];

k2 := h*k1+x[n]+y[n-1];

k := 1/2*(k1+k2);

y[n] := h*k+y[n-1]

end do;


data := [seq([x[n], y[n]], n = 0 .. 100)];
G1 := plot(data, style = point, color = "blue");
G1;

I am new to maple and I need help.

Let x=x(t) and y=y(t) be functions in t. Suppose that x'=2x−5y+t and y'=4x+9y+sint such that x(0)=y(0)=0. Find y(1).

How do I go about doing this question?

Thanks

This is the simplest method to explain numerically solving an ODE, more precisely, an IVP.

Using the method, to get a fell for numerics as well as for the nature of IVPs, solve the IVP numerically with a PC, 10steps.

Graph the computed values and the solution curve on the same coordinate axes.

 

y'=(y-x)^2, y(0)=0 , h=0.1

Sol. y=x-tanh(x)

 

I don't know well maple. 

I study Advanced Engineering Math and using maple, but i am stopped in this test.

I want to know how solve this problem.

please teach me~ 

IT IS EULER's method

Hi there. I'm Student

i want to know how solve this problem.

please teach me! 

y'=(y-x)^2, y(0)=0, h=0.1

sol.y=x-tanh(x)

how solve this problem for maple? 

please teach me~

I've got the following four differential equations :

v_x:=diff(x(t),t);
v_y:=diff(y(t),t);
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:

dy4:=diff(y(x),x);
eqn4:=dy4=sin(x*y(x));
ic1:=y(0)=1;
ans3:=dsolve({eqn4,ic1},y(x),type=numeric);

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

y'=-iDelta2y(t)+x(t)z(t)

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

I solve it as:

epsilon:=5:Delta1:=4:Delta2:=4:assume(z(t),real):

var:={x_R(t),y_R(t),z_R(t),x_I(t),y_I(t),z_I(t)}:
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?

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

1 2 Page 1 of 2