Items tagged with differential_equation differential_equation Tagged Items Feed

Hello,

 

I'm modeling the simple DC motor system in Maple.
The equations describing the system;

eq1:=J*diff(theta(t),t,t)+b*diff(theta(t),t)=K*i(t):
eq2:=L*diff(i(t),t)+R*i(t)=V(t)-K*diff(theta(t),t):
DCMotor:=[eq1,eq2];

First, I create the system using DiffEquation:

Sys:=DiffEquation(DCMotor,[V(t)],[theta(t)]);

And now I have problem. The input var is V(t) (input voltage) and the output var is theta(t) (position of the rotor).

But I wont to have in output var not position of the rotor but speed of the fotor - diff(theta(t),t)

How to set output var for diff(theta(t),t) (the speed of the motor)?

 

Best

Rariusz

 

Dear all.

I am a french ingineering student and I have some problems trying to modelize the ascension of a space balloon (closed balloon full of Helium) from 0 to 11000m in ISA conditions.

I think that my initialization is OK but I'm unfortunately not able to find how to solve my non linear equation. My equation is: ` ρ`[air]*V[Ballon]*g = mg+(1/2)*rho[air]*C[x]*V[z]^2

I copy my work below:

###############################################################################

#Atmospheric parameters, initialization
#temperature (K)

Ta := 15-6.5*((1/1000)*z(t))+273.15;

#pressure (Pascal)

 

 Pa := 1013*10^2*(1-3.32*10^(-5)*z(t))^(7/2);

#moleculai mass of air

 

M := 29;

#thermodynamic constant

R := 8.314;

#volumic mass of air following the altitude

 

J := M*Pa/(R*Ta);

#Laplace coefficient, initial volume of the balloon, ground pressure:

 

ga := 1.6665;

V0 := 4.43;

P0 := 1.013*10^2;

#Balloon volume following the altitude (Laplace formula)

 

Vball1 := (P0/Pa)^(1/ga)*V0;

#Disc surface for the drag force

S1 := 3.14^(1/3)*(3/4)^(2/3)*Vball1^(2/3);

with(DEtools);

Cx := .44; #(turbulent flow)

g := 9.81;

mball := 3; #(balloon mass)

ode1 := J*Vball1*g-mball*g-(1/2)*J*S1*Cx*(diff(z(t), t))^2 = 0;

ics := (D(z))(0) = 0, z(0) = 0:

dsolve(????????);

###############################################################################

The problem is that because of its non linear aspect, i don't know what kind of method I have to use to find the solution with my initial conditions. 

Thank you in advance for your answer, 

ANTHONY 

Hello

I am new to Maple. I am solving the differential equation with the given initial condition. I am getting some error. Can anyone help me please.

 

Thanks

maple_help.mw

This procedure calculate the equations of motions for Euclidean space and Minkowski space  with help of the Jacobian matrix.

Procedures
Calculation the equation of motions for Euclidean space and Minkowski space

"EQM := proc(eq, g,xup,xa,xu , eta ,var)"

Calling Sequence

 

EQM(eq, g, xup, xa, xu, eta, var)

Parameters

 

parameterSequence

-

eq, g, xup, xa, xu, eta, var

eq

out

equation of motion

g

out

metric

xup

out

velocitiy vector

xa

in

position vector

xu

in

vector of the independet coortinates

eta

in

signature matrix for Minkowski space

var

in

independet variable

 

``

 Procedur Code

 

restart; with(linalg); EQM := proc (eq, g, xup, xa, xu, eta, var) local J, Jp, xdd, l, xupp, ndim; ndim := vectdim(xu); xup := vector(ndim); xupp := vector(ndim); for l to ndim do xup[l] := diff(xu[l](var), var); xupp[l] := diff(diff(xu[l](var), var), var) end do; J := jacobian(xa, xu); g := multiply(transpose(J), eta, J); g := map(simplify, g); Jp := jacobian(multiply(J, xup), xu); Jp := map(simplify, Jp); xdd := multiply(inverse(g), transpose(J), eta, Jp, xup); xdd := map(simplify, xdd); xdd := map(convert, xdd, diff); eq := vector(vectdim(xupp)); for l to ndim do eq[l] := xupp[l]+xdd[l] = 0 end do end proc

``

Input

 

xa := Vector(3, {(1) = R*sin(`ϕ`)*cos(`ϑ`), (2) = R*sin(`ϕ`)*sin(`ϑ`), (3) = R*cos(`ϕ`)}); xu := Vector(2, {(1) = `ϕ`, (2) = `ϑ`}); eta := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

 

EQM(eq, g, xup, xa, xu, eta, t):

Output EOM

 

for i to vectdim(xu) do eq[i] end do;

diff(diff(`ϕ`(t), t), t)-cos(`ϕ`)*sin(`ϕ`)*(diff(`ϑ`(t), t))^2 = 0

 

diff(diff(`ϑ`(t), t), t)+2*cos(`ϕ`)*(diff(`ϑ`(t), t))*(diff(`ϕ`(t), t))/sin(`ϕ`) = 0

(5.1)

Output Line-Element

 

ds2 := expand(multiply(transpose(xup), g, xup));

(diff(`ϕ`(t), t))^2*R^2+(diff(`ϑ`(t), t))^2*R^2-(diff(`ϑ`(t), t))^2*R^2*cos(`ϕ`)^2

(6.1)

Output Metric

 

assume(cos(`ϕ`)^2 = 1-sin(`ϕ`)^2); g := map(simplify, g)

array( 1 .. 2, 1 .. 2, [( 2, 2 ) = (R^2*sin(`ϕ`)^2), ( 1, 2 ) = (0), ( 2, 1 ) = (0), ( 1, 1 ) = (R^2)  ] )

(7.1)

``

``

 

Download bsp_jacobi.mw

Procedures
Calculation the equation of motions for Euclidean space and Minkowski space

"EQM := proc(eq, g,xup,xa,xu , eta ,var)"

Calling Sequence

 

EQM(eq, g, xup, xa, xu, eta, var)

Parameters

 

parameterSequence

-

eq, g, xup, xa, xu, eta, var

eq

out

equation of motion

g

out

metric

xup

out

velocitiy vector

xa

in

position vector

xu

in

vector of the independet coortinates

eta

in

signature matrix for Minkowski space

var

in

independet variable

 

``

 Procedur Code

 

restart; with(linalg); EQM := proc (eq, g, xup, xa, xu, eta, var) local J, Jp, xdd, l, xupp, ndim; ndim := vectdim(xu); xup := vector(ndim); xupp := vector(ndim); for l to ndim do xup[l] := diff(xu[l](var), var); xupp[l] := diff(diff(xu[l](var), var), var) end do; J := jacobian(xa, xu); g := multiply(transpose(J), eta, J); g := map(simplify, g); Jp := jacobian(multiply(J, xup), xu); Jp := map(simplify, Jp); xdd := multiply(inverse(g), transpose(J), eta, Jp, xup); xdd := map(simplify, xdd); xdd := map(convert, xdd, diff); eq := vector(vectdim(xupp)); for l to ndim do eq[l] := xupp[l]+xdd[l] = 0 end do end proc

``

Input

 

t := x[0]/c; xa := Vector(4, {(1) = t, (2) = r*cos(`ϕ`), (3) = r*sin(`ϕ`), (4) = x[3]}); xu := Vector(4, {(1) = x[0], (2) = r, (3) = `ϕ`, (4) = x[3]}); eta := Matrix(4, 4, {(1, 1) = -1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1})

 

EQM(eq, g, xup, xa, xu, eta, tau):

Output EOM

 

for i to vectdim(xu) do eq[i] end do;

diff(diff(x[0](tau), tau), tau) = 0

 

diff(diff(r(tau), tau), tau)-(diff(`ϕ`(tau), tau))^2*r = 0

 

diff(diff(`ϕ`(tau), tau), tau)+2*(diff(`ϕ`(tau), tau))*(diff(r(tau), tau))/r = 0

 

diff(diff(x[3](tau), tau), tau) = 0

(5.1)

Output Line-Element

 

ds2 := expand(multiply(transpose(xup), g, xup));

-(diff(x[0](tau), tau))^2/c^2+(diff(r(tau), tau))^2+(diff(`ϕ`(tau), tau))^2*r^2+(diff(x[3](tau), tau))^2

(6.1)

Output Metric

 

assume(cos(`ϕ`)^2 = 1-sin(`ϕ`)^2); g := map(simplify, g)

array( 1 .. 4, 1 .. 4, [( 3, 3 ) = (r^2), ( 3, 4 ) = (0), ( 4, 1 ) = (0), ( 1, 1 ) = (-1/c^2), ( 4, 3 ) = (0), ( 4, 2 ) = (0), ( 2, 2 ) = (1), ( 3, 2 ) = (0), ( 3, 1 ) = (0), ( 2, 4 ) = (0), ( 1, 4 ) = (0), ( 1, 2 ) = (0), ( 2, 3 ) = (0), ( 4, 4 ) = (1), ( 2, 1 ) = (0), ( 1, 3 ) = (0)  ] )

(7.1)

``

``

 

Download bsp_jacobi_minkowski.mw

how to transform this differential equation with a substitution?

f := diff(u(x),x$2) + p(x)*diff(u(x),x)+q(x)*u(x)=0;
transformed := subs(x=1/t, f);

 

f := diff(u(x),t$2)*diff(t,x$2) + p(x)*diff(u(x),t)*diff(t,x)+q(x)*u(x)=0;

diff(1/t,t);
diff(1/t,t$2);

 

x = 1/t
dx/dt = -1/t^2
d2x/dt2 = 2/t^3

d2u/dt2*dt2/dx2
du/dt*dt/dx
diff(u(t),t$2)*1/(2/t^3) + p(t)*diff(u(t),t)*1/(-1/t^2)+q(t)*u(t)

restart;
f := u2*1/(2/t^3) + p(t)*u1*1/(-1/t^2)+q(t)*u;
f2 := collect(f/t^3*2, {u2, u1, u});
subs(u2 = diff(u(t),t$2), subs(u1 = diff(u(t), t), subs(u=u(t), f2)));

but not equal to below which is in book, is this equation wrong in book?

f := diff(u(t), t$2) + (2/t-1/t^2*p(1/t))*diff(u(t),t) + 1/t^4*q(1/t)*u(t) = 0;

 

Hi everyone--my differential equations course is using Maple; this is my first time using the program and I am a little cofused. 

In a lab component we are told to take the differential equation " dy/dx = sin (x - y) " and substitute in y = ax+b, then determine which coeffecients of a and b should be in order to obtain a solution.

I have made many attemps at this substitution, but am encountering syntax errors no matter what I do:

http://imgur.com/WVQsUQy

 

I know the general equation would be written in Maple as

 

>

 

..which presents no problems for me, format-wise, and generates a nice output.

However, any iteration I've tried with substituting y = ax+ b has resulted in an error like those shown in the linked image above; I'd really appreciate it if someone could explain how I would do the substitution and maybe what I'm doing wrong, syntax-wise.

 

Thank you for your time!

Dear friends,

 

I have a huge differential equation which I am trying to solve.

However, even solving it numerically, maple keeps evaluating it for a long time and then stops working! So there is no solution.

I just want to check if there is any solution to this differential equation at all!

Do you know a way with which maple can check if the differential equation is solvable?

 

I am interested in dynamic systems that changes system equations at a given point in time. So i often want to plot graphs that shows what would happen in the first 500 seconds, then using the point reached after 500 seconds as the starting point show what happens over the next 500 seconds.

For example my equations might innitially

diff(x,t)=x+p*y

diff(y,t)=x/y

and then after 500 seconds switch to 

diff(x,t)=x-p*y

diff(y,t)=x/y

simply estimating where the system is and feeding that into the other equation isn't an option because these equations have lots of parameters which p is representing in the above, and generally i want too use these graphs to illustrate the behaveious of the systems with the given parameters.

So far i use display and DEplot to make these grpahs.

Non dimensionalisation is a vary common task, and I was suprised that I couldn't find a maple tool to automate it . Has anyone developed their own package for it?

I want to automatically do it to the system equations for some Dynamical systems to make some of the other processing I do with them easier.

I was hoping to start with somehting in the form of 

Diff(x[1],t)=f[1](p[1]....p[n],x[1]...x[m])

...

Diff(x[m],t)=f[m](p[1]....p[n],x[1]...x[m])

where each f[i] is some kind of quotient of multivariate polynomials in the variables and parameters:
and end up with something like

Diff(y[1],s)=f[1](q[1]....q[p],y[1]...y[m])

...

Diff(y[m],s)=f[m](q[1]....q[p],y[1]...y[m])

where p<n


 

Download inf2.mw

hello

 

i write this set of differential equation in maple and get the following error?

Can anyon help me with this?

 

thanks

 

 

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

It says

p(q1+r2(q1))+p'(q1+r2(q1))*r2(q1)-c2'(r2(q1))=0

 where, I think,

' means diff(,q1),

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

and

p(q)=max(0,1-q).

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)))
a

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

thanks alot

error3.mw

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? 

Thanks!

Here it is:

 

 

 

 

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

 

1 2 3 4 5 6 7 Page 1 of 8