Items tagged with ode ode Tagged Items Feed

Hello

I was looking for information on how to solve a differential equation in Maple, but I do not know how to start.

I have yet equations in symbolic form and I want to apply for the calculation of such a procedure ODE4 (Runge Kutta 4) with fixed step integration Tc and time calculations ongoing T.

Where to start?
1. This should be done in another sheet, or I could write command in next line under the symbolic transformations?
2. To enter numeric parameters that certain symbols were they equal?
3. How to perform iterative calculations?

Thank you in advance for your help

I'm working in a tridimensional euclidean space, with vectorial functions of the type:

Fi(t)=<fix(t),fiy(t),fiz(t)>

Fi'(t)=<fix'(t),fiy'(t),fiz'(t)>

The two odes are of the type:

ode1:=K1*F1''(t)=K2*F2(t)&xF3(t)+...

While there are other non-differential vectorial equations like:

eq1:=K4*F4''(t)=(K5*F5(t)&x<0,1,0>)/Norm(F6(t))+..., etc

 

Is there a way i can input this system in dsolve with vectors instead of scalars? And without splitting everything into its 3 vectorial components? I can't make maple realize some of the Fi(t) functions are vectors, it counts them as scalars and says the number of functions and equations are not the same.

 

Thank you!

Hi,

It might be very silly question, but i dont know why it is not working out. So here is the question. In the attached maple shhet when i am trying to substitute eta(t)=epsilon*z(t) then it is not making that susbtitution for differential operator. Apart from that when i m collecting epsilon terms then also it not collecting it.quesiton.mw

 

Regards

Sunit

restart:with(plots):
eq:=(diff(f(eta),eta$2))-a*f(eta)+b*(1+diff(f(eta),eta)^2)^(-1/2)=0;
bc:=f(1)=0,D(f)(0)=0;
ans := dsolve(eq);

i have attcahed my ode with complex bvp

can anyone solved mine

NULL

restart

with(plots):

NULL

Eq1 := (11-10*d)*(diff(h(eta), eta))+2*f(eta) = 0;

(11-10*d)*(diff(h(eta), eta))+2*f(eta) = 0

 

(11-10*d)*(diff(diff(f(eta), eta), eta))-h(eta)*(diff(f(eta), eta))-f(eta)^2+g(eta)^2 = 0

 

diff(diff(g(eta), eta), eta)-h(eta)*(diff(g(eta), eta))-2*f(eta)*g(eta) = 0

 

diff(p(eta), eta)+2*(diff(f(eta), eta))-2*f(eta)*h(eta) = 0

(1)

NULL

NULL

`V&lambda;` := [0.5e-1, 1.5, 1.5]:

etainf := 3:

bcs := h(0) = 0, p(0) = 0, (D(f))(0) = lambda*f(0)^(4/3)/(f(0)^2+(1-g(0))^2)^(1/3), (D(g))(0) = -Typesetting:-delayDotProduct(lambda*f(0)^(1/3)*(1-g(0)), 1/(f(0)^2+(1-g(0))^2)^(1/3)), f(etainf) = 0, g(etainf) = 0;

h(0) = 0, p(0) = 0, (D(f))(0) = lambda*f(0)^(4/3)/(f(0)^2+(1-g(0))^2)^(1/3), (D(g))(0) = -f(0)^(1/3)*(1-g(0))*lambda/(f(0)^2+(1-g(0))^2)^(1/3), f(3) = 0, g(3) = 0

(2)

NULL

dsys := {Eq1, Eq2, Eq3, Eq4, bcs}:

for i to 3 do lambda := `V&lambda;`[i]; dsol[i] := dsolve(dsys, numeric, continuation = d); print(lambda); print(dsol[i](0)) end do

Error, (in dsolve/numeric/bvp) singularity encountered

 

NULL

NULL

NULL

 

Download compre1.mw

and attch back

Been working on a diffy q project, new to maple here. Any help is appreciated. Keep getting a similar error.

 

"Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem"

I thought I gave it initial values?

link to screenshot of the error bellow:

http://i.imgur.com/YVE1x7e.jpg

how to convert system of differential equations to differential form for evalDG?

 

[a(t)*(diff(c(t), t))+b(t), a(t)*(diff(b(t), t))+c(t)*(diff(b(t), t)), a(t)*(diff(c(t), t))+a(t)*(diff(b(t), t))+b(t)];

when i try eliminate dt which is the denominator

eliminate([a(t)*dc(t) + b(t)*dt,a(t)*db(t)+dt*c(t)*db(t),a(t)*dc(t)+a(t)*db(t)+b(t)*dt],dt);

[{dt = -a(t)/c(t)}, {a(t)*(c(t)*dc(t)-b(t)), a(t)*(db(t)*c(t)+c(t)*dc(t)-b(t))}]

 

i got two solutions, which one is correct?

a(t)*(c(t)*dc(t)-b(t)), a(t)*(db(t)*c(t)+c(t)*dc(t)-b(t))

does it mean that two have to use together to form a differential form?

 

update1

with(DifferentialGeometry):
DGsetup([a,b,c], M);
X := evalDG({a*(c*D_c-b), a*(D_b*c+c*D_c-b(t))});
Flow(X,t);
Flow(X, t, ode = true);

got error when run with above result

 

I'm trying to plot the varying results to a second degree differential function with different values for one constant in one graph. Here is what I have so far, which is already working.

______________________________________________________________________

> with(plots);
> m := 0.46e-1; d := 0.42e-1; v := 60; alpha0 := convert(12*degrees, radians); g := 9.81; pa := 1.205; cd := .2; n := 4000; omega := 2*Pi*(1/60);
                           
> p := 6*m/(Pi*d^3);
                           
> k1 := (3/4)*cd*pa/(d*p); k2 := (3/8)*omega*n*pa/p;
                  
> gl1 := vx(t) = diff(x(t), t);
                          
> gl2 := vy(t) = diff(y(t), t);
                     
> gl3 := diff(vx(t), t) = -k1*vx(t)*(vx(t)^2+vy(t)^2)^(1/2)-k2*vy(t);
       
> gl4 := diff(vy(t), t) = -g-k1*vy(t)*(vx(t)^2+vy(t)^2)^(1/2)+k2*vx(t);
 
> init1 := x(0) = 0;
> init2 := y(0) = 0;
> init3 := vx(0) = v*cos(alpha0);
> init4 := vy(0) = v*sin(alpha0);
> sol := dsolve({gl1, gl2, gl3, gl4, init1, init2, init3, init4}, {vx(t), vy(t), x(t), y(t)}, type = numeric);

> sol(.5);
> odeplot(sol, [x(t), y(t)], t = 0 .. 6.7);

______________________________________
What I'd like to do now is, for example, plot the solutions in one graph (preferably as a gif) for when n=1500, n=3000, n=4500 etc. Is there a simple way to achieve this? I've tried various methods so far without success.

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

Hello evrey one , I need help for solve these equation with boundary conditions 

 

 Boundary Conditions


My COde + equation 

NULL

restart; with(plots); with(PDEtools)

NULL

NULL

eq := diff(g(Y), `$`(Y, 4))+diff(g(Y), `$`(Y, 2))+g(Y);

diff(diff(diff(diff(g(Y), Y), Y), Y), Y)+diff(diff(g(Y), Y), Y)+g(Y)

(1)

cis := g(1/4) = 0, (D(g))(1/4) = 0, g(0) = 0, (D[2](g))(0) = 0

Error, (in evalapply) too few variables for the derivative with respect to the 2nd variable

 

solut := dsolve([eq, cis], numeric)

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

 

``

NULL

NULL

NULL

``

 

Download mp.mw

 

Thank you 

 

Hello,

 

I have a complex set of non linear diff eqns in the form :

y1'' = f(y1',y1,y2'',y2',y2,y3'',y3',y3,y4'',....,y6'',y6',y6,u1,u2,u3,u4) ;

y2'' = f(y1'',y1',y1,y2',y2,y3'',y3',y3,y4'',....,y6'',y6',y6,u1,u2,u3,u4)

and so on ... y6''=(...)

As I want to resolve this coupled systeme in matlab using @ODE45... I wanted the equations in the form : y1''=f(y1',y1,y2',y2,....) and so on ... => X'[] = f(X[],U[])

 

How can I force maple to rearrange a system of coupled eqns with only the variables i want ?

 

I know this is possible beacause it is a nonlinear state space model but maple do not work with nonlinear state space model... It give me error when I tried to create statespace model with my non linear diff eqns.

 

Thanks a lot !

solarsysem.mw Sorry for the repost but this is my newest document.

I have to create a solar system model on maple by defining a force equation then using the seq function to create a diffeq and then solving those differential equations using the initial conditions with the sun at (0, 0, 0) in xyz coordinates.

It works until my last "ic1" entry and I get an error in dsolve/numeric/process_input

I'm pretty desperate, I'll appreciate any help I can get

 

 

 

 

Dear all

I have the following equaion

Eq := diff(phi(x, k), x, x)+(k^2+2*sech(x))*phi(x, k) = 0;
          
The solution is given by 

phi := (I*k-tanh(x))*exp(I*k*x)/(I*k-1);

My question : At what value of k is there a bound state and in this case can we give a simple form of the solution phi(x,k)

 

With best regards

 

Dear Maple researchers

 

I have a problem in solving a system of odes that resulted from discretizing, in space variable, method of lines (MOL).

The basic idea of this code is constructed from the following paper:

http://www.sciencedirect.com/science/article/pii/S0096300313008060

If kindly is possible, please tell me whas the solution of this problem.

With kin dregards,

Emran Tohidi.

My codes is here:

> restart;
> with(orthopoly);
print(`output redirected...`); # input placeholder
> N := 4; Digits := 20;
print(`output redirected...`); # input placeholder

> A := -1; B := 1; rho := 3/4;
> g1 := proc (t) options operator, arrow; 1/2+(1/2)*tanh((1/2)*(A-(2*rho-1)*t/sqrt(2))/sqrt(2)) end proc; g2 := proc (t) options operator, arrow; 1/2+(1/2)*tanh((1/2)*(B-(2*rho-1)*t/sqrt(2))/sqrt(2)) end proc;
print(`output redirected...`); # input placeholder
> f := proc (x) options operator, arrow; 1/2+(1/2)*tanh((1/2)*x/sqrt(2)) end proc;
print(`output redirected...`); # input placeholder
> uexact := proc (x, t) options operator, arrow; 1/2+(1/2)*tanh((1/2)*(x-(2*rho-1)*t/sqrt(2))/sqrt(2)) end proc;
print(`output redirected...`); # input placeholder
> basiceq := simplify(diff(uexact(x, t), `$`(t, 1))-(diff(uexact(x, t), `$`(x, 2)))+uexact(x, t)*(1-uexact(x, t))*(rho-uexact(x, t)));
print(`output redirected...`); # input placeholder
                                      0
> alpha := 0; beta := 0; pol := P(N-1, alpha+1, beta+1, x); pol := unapply(pol, x); dpol := simplify(diff(pol(x), x)); dpol := unapply(dpol, x);
print(`output redirected...`); # input placeholder
> nodes := fsolve(P(N-1, alpha+1, beta+1, x));
%;
> xx[0] := -1;
> for i to N-1 do xx[i] := nodes[i] end do;
print(`output redirected...`); # input placeholder
> xx[N] := 1;
> for k from 0 to N do h[k] := 2^(alpha+beta+1)*GAMMA(k+alpha+1)*GAMMA(k+beta+1)/((2*k+alpha+beta+1)*GAMMA(k+1)*GAMMA(k+alpha+beta+1)) end do;
print(`output redirected...`); # input placeholder
> w[0] := 2^(alpha+beta+1)*(beta+1)*GAMMA(beta+1)^2*GAMMA(N)*GAMMA(N+alpha+1)/(GAMMA(N+beta+1)*GAMMA(N+alpha+beta+2));
print(`output redirected...`); # input placeholder
> for jj to N-1 do w[jj] := 2^(alpha+beta+3)*GAMMA(N+alpha+1)*GAMMA(N+beta+1)/((1-xx[jj]^2)^2*dpol(xx[jj])^2*factorial(N-1)*GAMMA(N+alpha+beta+2)) end do;
print(`output redirected...`); # input placeholder
> w[N] := 2^(alpha+beta+1)*(alpha+1)*GAMMA(alpha+1)^2*GAMMA(N)*GAMMA(N+beta+1)/(GAMMA(N+alpha+1)*GAMMA(N+alpha+beta+2));
print(`output redirected...`); # input placeholder
> for j from 0 to N do dpoly1[j] := simplify(diff(P(j, alpha, beta, x), `$`(x, 1))); dpoly1[j] := unapply(dpoly1[j], x); dpoly2[j] := simplify(diff(P(j, alpha, beta, x), `$`(x, 2))); dpoly2[j] := unapply(dpoly2[j], x) end do;
print(`output redirected...`); # input placeholder
print(??); # input placeholder
> for n to N-1 do for i from 0 to N do BB[n, i] := sum(P(jjj, alpha, beta, xx[jjj])*dpoly2[jjj](xx[n])*w[i]/h[jjj], jjj = 0 .. N) end do end do;
> for n to N-1 do d[n] := BB[n, 0]*g1(t)+BB[n, N]*g2(t); d[n] := unapply(d[n], t) end do;
print(`output redirected...`); # input placeholder
> for nn to N-1 do F[nn] := simplify(sum(BB[nn, ii]*u[ii](t), ii = 1 .. N-1)+u[nn](t)*(1-u[nn](t))*(rho-u[nn](t))+d[nn](t)); F[nn] := unapply(F[nn], t) end do;
print(`output redirected...`); # input placeholder
> sys1 := [seq(d*u[q](t)/dt = F[q](t), q = 1 .. N-1)];
print(`output redirected...`); # input placeholder
[d u[1](t)                                                                
[--------- = 40.708333333333333334 u[1](t) + 52.190476190476190476 u[2](t)
[   dt                                                                    

                                                                  2          3
   + 39.958333333333333334 u[3](t) - 1.7500000000000000000 u[1](t)  + u[1](t)

   + 7.3392857142857142858

   - 3.6696428571428571429 tanh(0.35355339059327376220

   + 0.12500000000000000000 t) - 3.6696428571428571429 tanh(
                                                     d u[2](t)   
-0.35355339059327376220 + 0.12500000000000000000 t), --------- =
                                                        dt       
-20.416666666666666667 u[1](t) - 25.916666666666666667 u[2](t)

                                                                  2          3
   - 20.416666666666666667 u[3](t) - 1.7500000000000000000 u[2](t)  + u[2](t)

   - 3.7500000000000000000

   + 1.8750000000000000000 tanh(0.35355339059327376220

   + 0.12500000000000000000 t) + 1.8750000000000000000 tanh(
                                                     d u[3](t)                
-0.35355339059327376220 + 0.12500000000000000000 t), --------- = 29.458333333\
                                                        dt                    

  333333333 u[1](t) + 38.476190476190476190 u[2](t)

                                                                  2          3
   + 30.208333333333333333 u[3](t) - 1.7500000000000000000 u[3](t)  + u[3](t)

   + 5.4107142857142857144

   - 2.7053571428571428572 tanh(0.35355339059327376220

   + 0.12500000000000000000 t) - 2.7053571428571428572 tanh(
                                                   ]
-0.35355339059327376220 + 0.12500000000000000000 t)]
                                                   ]
> ics := seq(u[qq](0) = evalf(f(xx[qq])), qq = 1 .. N-1);
print(`output redirected...`); # input placeholder
    u[1](0) = 0.38629570659055483825, u[2](0) = 0.50000000000000000000,

      u[3](0) = 0.61370429340944516175
> dsolve([sys1, ics], numeic);
%;
Error, (in dsolve) invalid input: `PDEtools/sdsolve` expects its 1st argument, SYS, to be of type {set({`<>`, `=`, algebraic}), list({`<>`, `=`, algebraic})}, but received [[d*u[1](t)/dt = (20354166666666666667/500000000000000000)*u[1](t)+(13047619047619047619/250000000000000000)*u[2](t)+(19979166666666666667/500000000000000000)*u[3](t)-(7/4)*u[1](t)^2+u[1](t)^3+36696428571428571429/5000000000000000000-(36696428571428571429/10000000000000000000)*tanh(1767766952966368811/5000000000000000000+(1/8)*t)-(36696428571428571429/10000000000000000000)*tanh(-1767766952966368811/5000000000000000000+(1/8)*t), d*u[2](t)/dt = -(20416666666666666667/1000000...

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