Items tagged with differential_equation

Hi guys,

I'm trying to solve this system I have but the solution doesn't display:

-I have two second degree differential equations with two functions.

-I have a set of two boundary conditions per function.

 

Thank you!
 

``

restart;

eq2:=2*diff(y(x), x$2)+diff(z(x), x$2)=0;

2*(diff(diff(y(x), x), x))+diff(diff(z(x), x), x) = 0

(1)

eq3:=2*diff(z(x), x$2)+diff(y(x), x$2)=0;

2*(diff(diff(z(x), x), x))+diff(diff(y(x), x), x) = 0

(2)

SOL:=dsolve({eq2, eq3, D(y)(0)=0, D(y)(1)=1, D(z)(0)=0, D(z)(1)=1}, {y(x), z(x)});

"SOL := "

(3)

``


 

Download trial.mwtrial.mw

Hello,

I have been trying to solve a simple nonlinear equation. Im interested in the solution per say rather than the plot but when I browsed about the commands to use, this came up. I tried it in my case and it is giving me the following errors:

ode.mw
 

``

restart;

``

with(plots);

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(1)

eq5:=C*sqrt(y(x)*((diff(y(x),x))^2+1))-y(x)=0;

C*(y(x)*((diff(y(x), x))^2+1))^(1/2)-y(x) = 0

(2)

C:=1;

1

(3)

bcs:=y(-1)=1, y(1)=1;

y(-1) = 1, y(1) = 1

(4)

dsys:={eq5,bcs};

{(y(x)*((diff(y(x), x))^2+1))^(1/2)-y(x) = 0, y(-1) = 1, y(1) = 1}

(5)

dsol:=dsolve(dsys, numeric); odeplot(dsol,[x,y(x)],0..1,color=red,axes=box);

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

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

``


 

Download ode.mw

 

A family of curves has polar equation r=cos^n (theta/n), 0<=theta,n*pi, where n is a positive even integer.

Using t = theta as the parameter, find a parametric form of the equation of the family of curves and show that 

dy/dx = (sin(t)sin(t/n)-cos(t)cos(t/n)) /( sin(t)cos(t/n)+cos(t)sin(t/n))

on maple i tried

x:=((cos(t/n))^n)*cos(t):

y:=((cos(t/n))^n)*sin(t):

w:=diff(x,t)

z:=diff(y,t)

z/w

and i never got the above answer so i did

simplify(z/w)

and still never got the answer instead i got 

(cos(t/n)*sin(t/n)-sin(t)*cos(t))/(cos(t/n)^2-cos(t)^2)

 

 

 

 

Hi,

I have a Maple code which produces an output plot for a first order differential equation,

nde := evalf(subs(npar, de));
nds := dsolve({nde, sigma(0) = -1e-8}, sigma(t), type = numeric);
acc_nds := (sig0, ae, re) -> dsolve({nde, sigma(0) = sig0}, sigma(t), type = numeric,
method = lsode[backfull], abserr = ae, relerr = re, maxfun = 0, ctrl=Ctrl);

odeplot(acc_nds(-0e-7, 1e-13, 1e-13), [t, sigma(t)], t = 0..2);

This produces the outputplot that I need for sigma(t). I need to produce a outut for d(sigmat)/dt, and how can this be done? what is the command I should use?

Additionally, how can i get the data set out of the polt in to a excel file or a text file?

I am quite new to maple, so i expect your kind support

Thanks

Hello all

 

I am new to Maple, and I am solving a system of two coupled partial differential equations using pdsolve, but I am having a hard time retrieving the solution evaluated at some point from the output. The output of pdsolve is a module, which appears to have different "methods" on it, including "plot3d" and "value". I can easily get a plot of my solution by using plot3d, but I don't know how to get a meaningful value out. For instance, if my solution is (f(x,y), g(x,y)), I would like to define H(x,y) = (f(x,y), g(x,y)), and be able to type H(10,10) into Maple to have my solution evaluated at that point. The result should be (1,1).

Here is a toy example:

firstEq := diff(f(x, y), x)+diff(f(x, y), y) = f(x, y)+g(x, y);
secondEq := diff(g(x, y), x)+diff(g(x, y), y) = 2*f(x, y)+g(x, y);
pdsystem := {firstEq, secondEq};

bv11 := f(10, y) = 1;
bv12 := f(x, 10) = 1;
bv21 := g(10, y) = 1;
bv22 := g(x, 10) = 1;
bvs := {bv11, bv12, bv21, bv22};
 
pdsolution := pdsolve(pdsystem, bvs, numeric, time = x, range = 0 .. 10);
 
pdsolution:-plot3d(x = 1 .. 10, y = 0 .. 10);
pdsolution:-value(10, 10);
Error, (in pdsolve/numeric/value) got additional unknown arguments {2}
 

Best regards.

 

I'm trying to plot the velocity of a ball thrown upwards with air resistance proportional to v^2 and also some simpler forms of this.

But the solution to v^2 returns root of and the plot stops for some specific time value. How can I proceed this plot to let's say 10 sec?

Staffan


 

``

``

restart

``

deq1 := m*(diff(v(t), t)) = -m*g:

``

sol := dsolve({deq1, v(0) = v__0}, v(t))

v(t) = -g*t+v__0

(1)

V := unapply(rhs(sol), t):

``

``

``

deq2 := m*(diff(v2(t), t)) = -m*g-k*v2(t):

``

sol2 := dsolve({deq2, v2(0) = v__0}, v2(t))

v2(t) = -g*m/k+exp(-k*t/m)*(v__0+g*m/k)

(2)

V2 := unapply(rhs(sol2), t):

``

deq3 := m*(diff(v3(t), t)) = -m*g-k*v3(t)*abs(v3(t))

m*(diff(v3(t), t)) = -m*g-k*v3(t)*abs(v3(t))

(3)

sol3 := dsolve({deq3, v3(0) = v__0}, v3(t))

v3(t) = RootOf(t+m*piecewise(_Z <= 0, arctanh(k*_Z/(k*m*g)^(1/2))/(k*m*g)^(1/2), 0 < _Z, arctan(k*_Z/(k*m*g)^(1/2))/(k*m*g)^(1/2))-m*piecewise(v__0 <= 0, arctanh(k*v__0/(k*m*g)^(1/2))/(k*m*g)^(1/2), 0 < v__0, arctan(k*v__0/(k*m*g)^(1/2))/(k*m*g)^(1/2)))

(4)

V3 := unapply(rhs(sol3), t):

``

m := 0.258e-2:

``

plot([V(t), V2(t), V3(t)], t = 0 .. 5, color = [blue, red, black], gridlines = true)

 

``


 

Download tal_3.9_sid_66_b.mw

The first half of this work sheet deals with SHM of pendulum. In the second half of the work sheet I attempt to solve for the general case of a swinging pendulum. Maple introduces a place holder (correct me if I have used the incorrect termonology) " __a" which I do not understand. What variable(s) should I replace it with and is there an automatic way of doing so?
 

restart

NULL

``

``

Simple*Harmonic*Motion*of*a*Pendulum

NULL

Eq1 := diff(Theta(t), t, t) = -omega^2*Theta(t)

diff(diff(Theta(t), t), t) = -omega^2*Theta(t)

(1)

ics := Theta(0) = 0, (D(Theta))(0) = Vmax

Theta(0) = 0, (D(Theta))(0) = Vmax

(2)

SHM := dsolve({Eq1, ics})

Theta(t) = Vmax*sin(omega*t)/omega

(3)

diffSHM := diff(SHM, t)

diff(Theta(t), t) = Vmax*cos(omega*t)

(4)

convert(diffSHM, D)

(D(Theta))(t) = Vmax*cos(omega*t)

(5)

eval[recurse](%, {t = 0, (D(Theta))(0) = Vmax})

Vmax = Vmax

(6)

solve(%, {_C1})

{_C1 = _C1}

(7)

assign(%); _C1

_C1

(8)

``

SHM

Theta(t) = Vmax*sin(omega*t)/omega

(9)

``

(General*Equation*of*Motion*of)*a*Pendulum

restart

diff(Theta(t), t, t) = -omega^2*sin(Theta(t))

diff(diff(Theta(t), t), t) = -omega^2*sin(Theta(t))

(10)

ics := Theta(0) = 0, (D(Theta))(0) = Vmax

Theta(0) = 0, (D(Theta))(0) = Vmax

(11)

Sol := dsolve(diff(Theta(t), t, t) = -omega^2*sin(Theta(t)))

Intat(1/(2*omega^2*cos(_a)+_C1)^(1/2), _a = Theta(t))-t-_C2 = 0, Intat(-1/(2*omega^2*cos(_a)+_C1)^(1/2), _a = Theta(t))-t-_C2 = 0

(12)

Sol[1]

Intat(1/(2*omega^2*cos(_a)+_C1)^(1/2), _a = Theta(t))-t-_C2 = 0

(13)

_C2 := 0

0

(14)

Sol[1]

Intat(1/(2*omega^2*cos(_a)+_C1)^(1/2), _a = Theta(t))-t = 0

(15)

``

dffSol[1] := diff(Sol[1], t)

(diff(Theta(t), t))/(2*omega^2*cos(Theta(t))+_C1)^(1/2)-1 = 0

(16)

``convert(dffSol[1], D)

(D(Theta))(t)/(2*omega^2*cos(Theta(t))+_C1)^(1/2)-1 = 0

(17)

 

eval[recurse](%, {t = 0, Theta(0) = 0, (D(Theta))(0) = Vmax})

Vmax/(2*omega^2+_C1)^(1/2)-1 = 0

(18)

solve(%, {_C1})

{_C1 = Vmax^2-2*omega^2}

(19)

assign(%); 1; _C1

Vmax^2-2*omega^2

(20)

dffSol[1]

(diff(Theta(t), t))/(2*omega^2*cos(Theta(t))+Vmax^2-2*omega^2)^(1/2)-1 = 0

(21)

``

dsolve(dffSol[1]); 1; SOL1 := int((diff(Theta(t), t))/sqrt(2*omega^2*cos(Theta(t))+Vmax^2-2*omega^2)-1, t = 0 .. Theta(t)) = 0

int((diff(Theta(t), t))/(2*omega^2*cos(Theta(t))+Vmax^2-2*omega^2)^(1/2)-1, t = 0 .. Theta(t)) = 0

(22)

Sol[1]

Intat(1/(2*omega^2*cos(_a)+Vmax^2-2*omega^2)^(1/2), _a = Theta(t))-t = 0

(23)

"Using  ( 1-cos(theta))/(2)=sin(theta/(2))^(2)and substituting by hand"

NotsoSHM := Intat(1/(Vmax*sqrt(1-2*omega^2*sin((1/2)*_a)^2/Vmax^2)), _a = (1/2)*Theta(t))-t = 0

Intat(1/(Vmax*(1-2*omega^2*sin((1/2)*_a)^2/Vmax^2)^(1/2)), _a = (1/2)*Theta(t))-t = 0

(24)

``

``


 

Download SHM_and_not_so_SHM.mw

I am practicing with some diff equations. I am having problem solving for one of the constants. I am having a pproblem assigning a value to derivatives or 2nd derivatives. What is a good general technique is this type of situation?
 

restart

NULL

``

omega^2 = g/l

omega^2 = g/l

(1)

Eq1 := diff(Theta(t), t, t) = -omega^2*Theta(t)

diff(diff(Theta(t), t), t) = -omega^2*Theta(t)

(2)

ics := Theta(0) = 0, (diff(Theta(t), t))(0) = Vmax, (diff(Theta(t), t, t))(0) = 0

Theta(0) = 0, (diff(Theta(t), t))(0) = Vmax, (diff(diff(Theta(t), t), t))(0) = 0

(3)

SHM := dsolve({Eq1, ics})

(4)

SHM := dsolve({Eq1})

{Theta(t) = _C1*sin(omega*t)+_C2*cos(omega*t)}

(5)

SHM := dsolve({Eq1, Theta(0) = 0})

Theta(t) = _C1*sin(omega*t)

(6)

``

diffSHM := diff(SHM, t)

diff(Theta(t), t) = _C1*omega*cos(omega*t)

(7)

``

(Theta(t))(0) = 0, (diff(Theta(t), t))(0) = V

(Theta(t))(0) = 0, (diff(Theta(t), t))(0) = V

(8)

``

``

``

``

``

NULL

NULL


 

Download SHM.mw

Hi!

Everyone,

I want to draw  phase plane of system of three fractional order equations. 

 

Note that 

Also want the  phase portrait when the values of alpha are not same....

Also

Thanks

 

 

 

I want to get solutions of this system ,can anyone help me ?solutions.mw

i have solved the coupled equations .... and want to subtract a constant

i want to subtract constant from the result of last equation

r_p_m.mw

A population p(t) governed by the logistic equation with a constant rate of harvesting satisfies the initial value problem diff(p(t), t) = (2/5)*p(t)*(1-(1/100)*p(t))-h, p(0) = a. This model is typically analyzed by setting the derivative equal to zero and finding the two equilibrium solutions p = 50+`&+-`(5*sqrt(100-10*h)). A sketch of solutions p(t) for different values of a suggests that the larger equilibrium is stable; the smaller, unstable.

 

When a is less that the unstable equilibrium, p(t) becomes zero at a time t[e], and the population becomes extinct. If p(t) is not interpreted as pertaining to a population, its graph exists beyond t[e], and actually has a vertical asymptote between the two branches of its graph.

 

In the worksheet "Logistic Model with Harvesting", two questions are investigated, namely,

 

  1. How does the location of this vertical asymptote depend on on a and h?
  2. How does the extinction time t[e], the time at which p(t) = 0, depend on a and h?

To answer the second question, an explicit solution p = p(a, h, t), readily provided by Maple, is set equal to zero and solved for t[e] = t[e](a, h). It turns out to be difficult both to graph the surface t[e](a, h) and to obtain a contour map of the level sets of this function. Instead, we solve for a = a(t[e], h) and obtain a graph of a(h) with t[e] as a slider-controlled parameter.

 

To answer the first question, the explicit solution, which has the form alpha*tan(phi(a, h, t))*beta(h)+50, exhibits its vertical asymptote when phi(a, h, t) = -(1/2)*Pi. Solving this equation for t[a] = t[a](a, h) gives the time at which the vertical asymptote is located, a function that is as difficult to graph as t[e]. Again the remedy is to solve for, and graph, a = a(h), with t[a] as a slider-controlled parameter.

 

Download the worksheet: Logistic_with_Harvesting.mw

i don't know much about maple, i need to solve the following odes system... I study a little on the help page of maple about numeric[midrich] that takes bvp and deal singularity as well but dint know how to used in the following system

odes.mw

I use pdsolve to solve this system of equation but the graph I have is different from the author's graph. I think I'm missing out on something. Can anyone help me out with the solution using any Maple command and module.

PDE := {diff(phi(x, t), t) = (diff(phi(x, t), x, x))/S__c-K__r*phi(x, t)+S__r*(diff(theta(x, t), x, x)), diff(u(x, t), t) = diff(u(x, t), x, x)-M^2*(u(x, t)-m*w(x, t))/(m^2+1)-u(x, t)/`&varkappa;`-2*Omega^2*w(x, t)+Gr*theta(x, t)+Gm*phi(x, t), diff(w(x, t), t) = diff(w(x, t), x, x)+M^2*(m*u(x, t)-w(x, t))/(m^2+1)-w(x, t)/`&varkappa;`+2*Omega^2*u(x, t), diff(theta(x, t), t) = lambda*(diff(theta(x, t), x, x))/P__r}

With Inittial and boundary condition : {phi(0, t) = 1, phi(9, t) = 0, phi(x, 0) = 0, u(0, t) = t, u(9, t) = 0, u(x, 0) = 0, w(0, t) = 0, w(9, t) = 0, w(x, 0) = 0, theta(0, t) = 1, theta(9, t) = 0, theta(x, 0) = 0}

With the following parameter declared as:

I will appreciate the graph of the solution with time t:0.3, 0.5, 0.7 and 1.0.

Thanks.

i am trying to solve an initial value problem i have applied a numeric code but the progam give me an error but instead of several efforts i couldn't correc the error..rho(r).mw

 

1 2 3 4 5 6 7 Last Page 1 of 11