Items tagged with differential-equations

Feed

 

the program shows that the error please verify it sirprogram11.mw

Hi

I have two equations as follows:

The goal is finding the parameter 'phi'. This parameter is a positive real numeric constant.

I uploaded two files that they are included two methods to solve the problem.

1.mw

2.mw

Is method in the first file mathematically logical? If it is a correct method, why the command fsolve dosent work?

In file 2, we have 2 equations with further indeterminantes. The constant 'phi' must be minimum possible amount. How we can use the commands like the Minimize in Optimization? Please hint me.

Moreover, if there is a method to solve this problem please help me to know.

Thank you very much 

 

 

Hi Everybody,

I have a simple question: Does Maple solve systems of partial differential equations with boundary conditions?

Can somebody give me an example? 

I have only found numerical solutions to this kind of systems but no symbolic example.

Thanks a lot for yor help.

 

Hello everyone.

Please can I meet with Computational or/and Numerical anlysts that have worked or working on the algorihms particularly (Runge Kutta Nystrom, Block multistep methods including hybrid and Block Boundaru Value methods) for the solution of both IVP and BVP.

I will appreciante if I can learn from them and possibly collaborate with them. Thank you in anticipation of your positive response.

Hi, There is a problem in solving ODE using dsolve/numeric code. You people would like to help me in resolving the error, here is in attached file,

Latif_paper.mw

I have a differential equation which it seems not be solvable. can anyone help me to solve?

Thank you

difeq.mw

Hi Guyz 

I have a problem with a numerical solution.

with the boundary conditions mentioned in the file we want to solve the differential equation numerically and find omega by using the shooting method

numshooting.mw

 

Dear sir,

in the program boundary conditions D(f)(0)=0 doesn't showing result but when use d(f)(0)=1 it will execute, why is this can you explain this ?program.mw
 

So, I'm trying to delelop an algorithm for the method of multiple scales. Starting with a simple ODE:

diff(x(t), `$`(t, 2))+x(t) = 0

After scaling, it should be written in the form:

(d/dT[0]+epsilon*d/dT[1]+epsilon^2*d/dT[2])^2*(epsilon^3*X[3]+epsilon^2*X[2]+epsilon*X[1])+epsilon*X[1]+epsilon^2*X[2]+epsilon^3*X[3] = 0

A proto-algorithm would be:

restart;
ode := diff(x(t), `$`(t, 2))+x(t) = 0;
i_ini := 1; i_fin := 3; j_ini := 0; j_fin := 2;
PDEtools:-dchange({t = sum(epsilon^j*T[j], j = j_ini .. j_fin), x(t) = sum(epsilon^i*X[i](T[1]), i = i_ini .. i_fin)}, ode, [{T[0], T[1], T[2]}, {X[1], X[2], X[3]}])

It is not working, though. Could anyone help me out?

Thanks in advance.

Pls what is the maple code for the fourth order Runge-kutta method for five systems of ODE of several variables?

i am interested to numerically solve the 3 non-linear coupled ODE's in the 3 different intervals of rho(define in attached file) for the different corresponding parameters alpha and beta at i=0..2.

density_interval_solution.mw 


To summarize,

dsolve numeric parametric form gives wrong answers when fdiff is used to calculate the Hessian. Doing dsolve twice gives the correct answer. Hope I am not making syntax or programming errors.

Also, fdiff is not compatible with vector form.

restart;

Digits:=15;

Digits := 15

(1)

sys:=diff(y1(t),t)=-(u+u^2/2)*y1(t),diff(y2(t),t)=u*y1(t);

sys := diff(y1(t), t) = -(u+(1/2)*(u^2))*y1(t), diff(y2(t), t) = u*y1(t)

(2)

 The system is solved with initial conditions 1,0 and value of u being equal to u1 for t<=0.5, and u2 for t>0.5. The objective is y2 at t =1. There are errors when Hessian is calculated using parametric dsolve and fdiff

sol1 := dsolve({sys, y1(0) = alpha, y2(0) = beta}, type = numeric, 'parameters' = [alpha, beta, u],maxfun=0,range=0..0.5):

obj1:=proc(u1,u2)
local z1,s1,s2,z2;
global sol1;
sol1('parameters'=[1,0,u1]);
z1 := sol1(.5);
s1:=subs(z1,y1(t));
s2:=subs(z1,y2(t));
sol1('parameters'=[s1,s2,u2]):
z2:=sol1(0.5);
-subs(z2,y2(t));
end proc;

obj1 := proc (u1, u2) local z1, s1, s2, z2; global sol1; sol1('parameters' = [1, 0, u1]); z1 := sol1(.5); s1 := subs(z1, y1(t)); s2 := subs(z1, y2(t)); sol1('parameters' = [s1, s2, u2]); z2 := sol1(.5); -subs(z2, y2(t)) end proc

(3)

u0:=[0.8,1.8];

u0 := [.8, 1.8]

(4)

obj1(op(u0));

-.552540796143903

(5)

Hess1:=Matrix(2,2):for i from 1 to 2 do for j from 1 to 2 do Hess1[i,j]:=fdiff(obj1,[i,j],u0,workprec=1.0);od;od;Hess1;

Matrix(2, 2, {(1, 1) = 115.470000000000, (1, 2) = -1.11000000000000, (2, 1) = -1.11000000000000, (2, 2) = 2.22000000000000})

(6)

 Hessian is wrong. It should be noted that when dsolve is called twice inside the objective function there is no error in Hessian calculation with fdiff. The parametric dsolve is efficient, how to get correct answers with that? Another question is how to use fdiff with vector form instead u1,u2 etc to make it generic for any number of variables?

obj2:=proc(u1,u2)
local z1,s1,s2,z2,sol2;
sol2:=dsolve({op(subs(u=u1,[sys])), y1(0) = 1, y2(0) = 0}, type = numeric,maxfun=0,range=0..0.5);
z1 := sol2(.5);
s1:=subs(z1,y1(t));
s2:=subs(z1,y2(t));
sol2:=dsolve({op(subs(u=u2,[sys])), y1(0) = s1, y2(0) = s2}, type = numeric,maxfun=0,range=0..0.5):
z2:=sol2(0.5);
-subs(z2,y2(t));
end proc;

obj2 := proc (u1, u2) local z1, s1, s2, z2, sol2; sol2 := dsolve({op(subs(u = u1, [sys])), y1(0) = 1, y2(0) = 0}, type = numeric, maxfun = 0, range = 0 .. .5); z1 := sol2(.5); s1 := subs(z1, y1(t)); s2 := subs(z1, y2(t)); sol2 := dsolve({op(subs(u = u2, [sys])), y1(0) = s1, y2(0) = s2}, type = numeric, maxfun = 0, range = 0 .. .5); z2 := sol2(.5); -subs(z2, y2(t)) end proc

(7)

obj2(op(u0));

-.552540796143903

(8)

Hess2:=Matrix(2,2):for i from 1 to 2 do for j from 1 to 2 do Hess2[i,j]:=fdiff(obj2,[i,j],u0,workprec=1.0);od;od;Hess2;

Matrix(2, 2, {(1, 1) = .234295697631809, (1, 2) = 0.101868715004724e-1, (2, 1) = 0.101868715004724e-1, (2, 2) = 0.853480932660994e-1})

(9)

 Doing dsolve twice gives correct answer compared to one parametric dsolve even though objective returns the same number (even gradient returns the expected answers).


 

Download Bugindsolveorfdiff.mws

hi .may every one help me for pdsolve this differential equations?

all initial boundary condition are zero

thanks...

pdeSol_(1).mw

 

#
# Define some parameters
#
  sigma := 10; N := 0; beta := 1; alpha := 1; PDE1 := diff(w(X, theta, t), X, X, X, X)+2*alpha^2*(diff(w(X, theta, t), theta, theta, X, X))+alpha^4*(diff(w(X, theta, t), theta, theta, theta, theta))-N*(diff(w(X, theta, t), X, X))+diff(w(X, theta, t), t, t)-beta*w(X, theta, t)-sigma = 0

10

 

0

 

1

 

1

 

diff(diff(diff(diff(w(X, theta, t), X), X), X), X)+2*(diff(diff(diff(diff(w(X, theta, t), X), X), theta), theta))+diff(diff(diff(diff(w(X, theta, t), theta), theta), theta), theta)-10+diff(diff(w(X, theta, t), t), t)-w(X, theta, t) = 0

(1)

#
# Define the PDES
#
  PDEs:= { diff(w(X, theta, t), X, X, X, X)+2*alpha^2*(diff(w(X, theta, t), theta, theta, X, X))+alpha^4*(diff(w(X, theta, t), theta, theta, theta, theta))-N*(diff(w(X, theta, t), X, X))+diff(w(X, theta, t), t, t)-beta*w(X, theta, t)-sigma = 0
   };

{diff(diff(diff(diff(w(X, theta, t), X), X), X), X)+2*(diff(diff(diff(diff(w(X, theta, t), X), X), theta), theta))+diff(diff(diff(diff(w(X, theta, t), theta), theta), theta), theta)-10+diff(diff(w(X, theta, t), t), t)-w(X, theta, t) = 0}

(2)

#
# Set of boundary conditions at x=1.
#
   bcs1:= { D[1](w)(1,theta, t) = 0,
              w(1,theta, t) = 0
         };

{w(1, theta, t) = 0, (D[1](w))(1, theta, t) = 0}

(3)

#
# Set of boundary conditions at x=0
#
  bcs2:= {    w(0,theta, t)=0,
           D[1](w)(0,theta, t)=0
         };

{w(0, theta, t) = 0, (D[1](w))(0, theta, t) = 0}

(4)

#
# Set of boundary conditions at t=0
#
  bcs3:= { w(x,theta,0)=0,
          
           D[2](w)(x,theta,0)=0 };
           

{w(x, theta, 0) = 0, (D[2](w))(x, theta, 0) = 0}

(5)

 


  pdsolve( PDEs, `union`(bcs1, bcs2, bcs3), numeric);

Error, (in pdsolve/numeric/process_PDEs) can only numerically solve PDE with two independent variables, got {X, t, theta}

 

 

 

Download pdeSol_(1).mw

Hi everyone

I'm trying to solve the following system of ODE equations for my end paper and since I'm new with maple I couldn't find a way to do it. Can anyone Plz help me? I need to fit a curve to the result and gain a symbolic equation.

Here are the equations I need to solve

d^2*Y(x)/dt^2 = 500000*Y(x)*exp(-10/T(x))+d*Y(x)/dt

d^2*T(x)/dt^2 = 10*(-100000*Y(x)*exp(-10/T(x)))+d*T(x)/dt

with the follwoing boundary conditions:

Y(0)=1 , Y'(0)=0, T(0)=0 , T'(0)=0

I need to plot Y and T and then find then do the curve fitting thing.

I really appreciate your help.

Hello!

So as the title says i have a problem with solution of second order differential equation system.

The problem is that after i set some initial conditions and check the solution when the time equals zero, the solution graph is completely different from my initial conditions which is obviously incorrect. I know that i can change "spacestep" parameter, but i am not sure if it is the only way to fix the problem. Are there any other ways to fix this?

Here is a part of my code if it helps

r0=1.570796327
theta0=6.000000000


1 2 3 Page 1 of 3