Items tagged with differential_equation differential_equation Tagged Items Feed

I want to solve an ODE from Game Theory, the Cournot competition.

It says


 where, I think,

' means diff(,q1),

c2(q2)=c*q2 for a fixed c in [0,1]



So c2,p and r2 are functions.r2 goes from [0,inf) to [0,inf).

I look for r2, which should be r2(q1)=(1-q1-c)/2 when correctly solved.

However, the command dsolve says Error in dsolve (divison by 0).

 What is wrong? How do I obtain the solution for r2 in Maple?


_C1, _C2, _C3 are constant, how to set them constant, to make diff(_C2) = 0 etc

eval(simplify(subs(a=_C1,subs(b=1/(diff(c(t), t)),subs(c=_C2+_C3*exp(-t),eq2)))));

(diff(_C2(t), t)+(diff(_C3(t), t))*(exp(-t))(t)+_C3(t)*(diff((exp(-t))(t), t)))*(-(diff(_C1(t), t))*(diff(diff((c(t))(t), t), t))/(diff((c(t))(t), t))^2+(diff(s(t), t))/(diff((c(t))(t), t)))

hi.please see attached file and explain how i remove error

thanks alot

I am trying to integrate solutions to a set of differential equations I have obtained numerically but keep getting this error:

Error, (in solW) invalid input: subs received sol(r), which is not valid for its 1st argument

For simplicity, let's say I am interested in integrating the function W(r), which I obtain from 

sol := dsolve({eqns, ics}, numeric, abserr = 10^(-10), relerr = 10^(-10), range = ymin .. ymax)

I then use

solW := r -> subs(sol(r), W(y))

This gives me W(r) for any r in the range ymin to ymax. But I cannot do anything with this function. For example, 

int(solW(r),r=ymin..ymax) or plot(solW(r),r=ymin..ymax) give the error above. I know that I can plot the solutions using odeplot, but is there something analogous for integrating the solutions? 


Here it is:





I'd like to input it as 2-D and solve for x as a function of t.


hello guys,


i have 4 differential equations with 4 unknown functions and i want to find functions , what is your idea ?


thank you very much

Dear all,

I have to differential equations that I'd like to linearise, that is all higher order (>1) derivatives (like diff(uu[0],x$2)) and parameters (like beta^2) and the products of any derivatives with the parameters uu[0] and beta are zero (as they are assumed small).

The two equations considered are displayed below:


Up to now, I perform a very tedious substitution which is based on looking at the equations above and decide which terms I want to get rid of. Something like this, where K =1:KFBCLin:=simplify(eval(KFBC, [beta^3 = 0, beta^2 = 0,
seq(subs((diff(uu[n], x$3)) = 0),n=0..K),
seq(subs((diff(uu[n], x$2)) = 0),n=0..K),
seq(subs((diff(uu[n], t))*beta = 0),n=0..K),
seq(subs((diff(uu[n], x))^2 = 0),n=0..K),
seq(subs(g*diff(beta, x)*beta = 0),n=0..K),
seq(subs((d^2*diff(uu[n], x,t)*diff(beta,x)=0)),n=0..K),
seq(subs(-2*d*diff(uu[n], x,t)*beta*diff(beta,x)=0),n=0..K),
seq(subs((d^2*diff(uu[n], x$2,t)*beta=0)),n=0..K),
seq(subs((diff(uu[n], x)*uu[n])=0),n=0..K),
seq(subs((diff(uu[n], x)*uu[n]*beta)=0),n=0..K),
seq(subs((diff(uu[n], x)*uu[n]*d)=0),n=0..K),
seq(subs((diff(beta, x)*uu[n])=0),n=0..K),
seq(subs((diff(uu[n], x)*beta)=0),n=0..K)]));As there is a lack of automatisation, this procedure is not very helpful. Life would be easier if there was a command (or the like) that says "get rid of higher order derivatives".Any help is appreciated.Best regards,

Hello, dear experts.
I have a question...
solve the system of differential equations,where one of the initial conditions need to be chosen so thatcondition is metat the end of integration.
The task is not difficult, but I'm having trouble with the syntax.

1.I can't "pull"the desired function from the solution and find its value at a certain point.
I try to do so:
but there is no result

2.In this case,instead of"for"it is better to use a while loop, but again the problem arises 1.
Tell me, please,how to implemen my program.






for i from 1 to 3000 do

sys := diff(rT1(s), s)-A(s)*T2(s)*cos(theta(s)),diff(theta(s), s)-A(s)/T1(s)*(p-T2(s)*sin(theta(s)/r(s))),diff(r(s),s)-A(s)*cos(theta(s)),diff(z(s),s)-A(s)*sin(theta(s));
fcns := {rT1(s),theta(s),r(s), z(s)};
F := dsolve({sys,rT1(0)=rT1_n, theta(0)=theta_min,r(0) = r_min, z(0) = 0}, fcns, numeric,output=listprocedure):
if abs(evalf(r_ravn(s_end))-R)=delta then break:
end if:
end do:



I have a system of nonlinear equations in conjuction with boundary conditions, as below:

(all coefficients are constant.)

dsys3 := {a2*(diff(f1(x), x, x))+a3*(diff(f2(x), x, x, x))+a4*(diff(f2(x), x))+a6*(diff(f3(x), x))+a7*f1(x)+a1N*(diff(f3(x), x, x))*(diff(f3(x), x))+a2N*(diff(f3(x), x))*f3(x)+a3N*(diff(f3(x), x))*f3(x) = 0, a8*(diff(f2(x), x, x, x, x))+a9*(diff(f2(x), x, x))+a10*f2(x)+a11*(diff(f1(x), x, x, x))+a12*(diff(f1(x), x))+a13*(diff(f3(x), x, x))+a14*f3(x)+a4N*(f3(x)*f3(x))+a5N*((diff(f3(x), x))*(diff(f3(x), x)))+a6N*(diff(f3(x), x, x))*f3(x) = 0, (diff(f3(x), x, x, x, x))*a16+(diff(f3(x), x, x))*a18+(diff(f3(x), x, x))*a19+(diff(f1(x), x))*a22+(diff(f1(x), x))*a23+(diff(f2(x), x, x))*a24+f2(x)*a25+f2(x)*a26+f3(x)*a27+f3(x)*a29 = 0, f1(0) = 0, f1(1) = 0, f2(0) = 0, f2(1) = 0, f3(0) = 0, f3(1) = 0, ((D@@1)(f2))(0) = 0, ((D@@1)(f2))(1) = 0, ((D@@1)(f3))(0) = 0, ((D@@1)(f3))(1) = 0}:
dsol5 := dsolve(dsys3, 'maxmesh' = 500, abserr = .1, numeric, range = 0 .. 1, output = listprocedure)

but i encounter an error as:

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

what is your suggestion to solve this nonlinear equations?

Thank you.


initial condition: u(x,0)=1-x, abslute x<1   Ut(x,0)=cos(pix), bslute x<1 

B.C U(-4,t)=U(4,t)=0,   delta x=0.1, delta t=0.025, range 0..4                                      

I want to solve the following differential equation

(y''(x)=(λ*x* y[x])/Sqrt(-1+ x), y(x),x)

But do not know how to actually solve it. Any suggestion?

Hi all
how can I solve an equation? Pleas, help!

I have a differential equation with one unknown.
I first solve the differential equation, and then use the boundary condition to find his unknown, however, get the error:
Error, (in sol_2) parameter 'X' must be assigned a numeric value before obtaining a solution.

How can I find X?


 eq := diff(V(z), `$`(z, 2)) = B*(abs(M_x(z))/J_nc)^n*signum:cond := V(0) = 0, (D(V))(0) = 0;
 sol_2 := dsolve({cond, eq}, numeric);


Consider the problem of a hard-hit baseball. The air-friction drag on a baseball is approximately given by the following formula

and subsequent 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;


C[d] is the drag coefficient (about 0.35 for a baseball)

rho[air] is the density of air (about 1.2 kg/
r is the radius of the ball (about 0.037 m)

v is the vector velocity of the ball

Then if given that : 

Power hitters in baseball say they would much rather play in Coors Field in Denver than in sea-level stadiums because it is so much easier to hit home runs. The air pressure in Denver is about 10% lower than it is at sea level. The field dimensions at Coors Field are:

Left Field - 347 feet (106 m)
Left-Center - 390 feet (119 m)
Center Field - 415 feet (126 m)
Right-Center - 375 feet (114 m)
Right Field - 350 feet (107 m)

 1. Overlay two plots: one at sea level and one in Denver to show why power hitters prefer Coors field.

2. Find the initial magnitude of velocity, v0

needed to hit a home run to Right-Center, where v_x(0)=v0/sqrt(2) and v_y(0)=v0/sqrt(2)

I don't quite understand how to use the field dimensions for both 1 and 2 and am pretty clueless as to how to approach this question using the ordinary differential equations mentioned above.



Hey guys. I've tried to find an answer for this, but have struggled since our learning book is in danish, so the used terms may not be technically correct, so sorry for poor phrasing.


Anyway, how would you solve this problem in maple?


Find a solution for the differential equation:

d4y/dt4 - 16y = u' + u

With the effect*  u(t) = e3t + 3et



I've gotten this result (By hand calculation)

y(t) = 4/65*e3t - 6/15*et



Thanks for the help. It's my first post, so let me know if I should do something different next time :)



Bonus question:

How do you calculate the transfer function in maple:

H(s) = (s + 1)/(s4-16)


*Don't know if 'effect' is the correct term. 

I am attempting to plot an initial value problem in Maple 18.  I have my equation defined, as well as a general solution and two particular solutions at y(0)=3/4 and y(0)=1/2.  To graph, I entered the command


but instead of returning a graph, the software gave me the error message

Error, (in DEtools/DEplot/CheckDE) extra unknowns found: sinx

The Maple support site lists this as an unknown error, and as a new user, I'm not sure what to do.  What does this mean?

1 2 3 4 5 6 7 Page 1 of 7