Items tagged with boundary boundary Tagged Items Feed


with(DETools, diff_table);

kB := 0.138064852e-22;

R := 287.058;

T := 293;

p := 101325;

rho := 0.1e-2*p/(R*T);

vr := diff_table(v_r(r, z));

vz := diff_table(v_z(r, z));

eq_r := 0 = 0;

eq_p := (vr[z]-vz[r])*vr[] = (vr[]*(vr[r, z]-vz[r, r])+vz[]*(vr[z, z]-vz[z, r]))*r;

eq_z := 0 = 0;

eq_m := r*vr[r]+r*vz[z]+vr[] = 0;

pde := {eq_m, eq_p};

IBC := {v_r(1, z) = 0, v_r(r, 0) = 0, v_z(1, z) = 0, v_z(r, 0) = r^2-1};

sol := pdsolve(pde, IBC, numeric, time = z, range = 0 .. 1);


what am I doing wrong?

it's telling me: Error, (in pdsolve/numeric/par_hyp) Incorrect number of boundary conditions, expected 3, got 2
but i did just as in the example :-/

Hello altogether,

I want to plot the numerical result of an ODE, which seems to be pretty simple at first sight, but the difficulty is that the boundaries are depending on the solution.

The following pseudo-code describes what I want to have, but it doesn't work. This code fills the RAM pretty fast and you will have to kill the process.

Is it possible to calculate a solution to this problem numerically (or even analytically) and if yes, how?

Since I am new here, I am sorry for any bad-to-read maple code or any noob errors I have made. I would be very thankful, for any response and help.



Hi !

I am trying to solve a pde with initial/boundary conditions, in the numeric mode. It works very well when I provide 3 numerical conditions : 1 initial condition (uniform distribution at first), and two boundary conditions.

Now I want to switch the initial condition to a function of r. It's a polynome I obtained after interpolation of another result. I tested it and the function interp20(r) works. But the pdsolve doesn't seem to evaluate the function, when it comes to start the procedure and pdsolve doesn't return a module as it should, although it doesn't send any message error.

You can see the code following, with the error messages I get.


Is it strictly impossible to use a function as an initial condition ?
Is it just a problem I could solve by converting the function or its result to something else ?
Is float the right type of input ? For example, if I write a:=283.15, is it a float ?
Have you already had similar problems ? How did you solve them ? Where could I find working code examples on this ?
Could I solve this problem with non-uniform initial condition with another Maple function ?

Then you very much for your help !



I am trying to solve a PDE which is converted to ODE when we assign one of the  variables some value. The boundary conditions given to the PDE are numerical values given for fixed numerical values to the two independent variables. I am trying to solve the PDE with the staandard syntax:

pds := pdsolve(pde,[ibc],numeric,time=z,range=0..beta);

The error message I get is:  

Error, (in pdsolve/numeric/process_PDEs) PDEs can only contain dependent variables with direct dependence on the independent variables of the problem, got {theta(z, 0)}

The pde and boundary conditions are as follows:

PDE:   pde := diff(theta(z, 0), z, z)+theta(z, 0)

Where zero is the fixed value for an independent variable

Boundary Condition:  ibc:={theta(0,0)=beta,D[1](theta)(0,0)=0};

When I try to solve it as an ODE the error is:

Error, (in dsolve) not an ODE system, please try pdsolve


Hi everyone,

I am trying to solve the equation of heat tranfer, time dependent, with particular Initial and boundary conditions but I am stuck by technical problems both in getting an analytical solution and a numerical one.

The equation

the equation.

I defined a and b numerically. domain is : and I defined surf_power numerically.

The initial condition is : , T0 defined numerically

The boundary condition is : , because it has a shperical symetry.

To me, it looks like a well posed problem. Does it look fine ?

Problem in analytical solution :

It doesn't accept the boundary condition so I only input the initial condition and it actually gives me back an expression that can be evaluated but it never does : I can't reduce it more than an expression of fourier which I can't eval. The solution :
The solution calculated in (0,0). I was hoping T0...

Are you familiar with these problems ? What would be the perfect syntax you would use to solve this ?

The numerical solution problems :

Sometimes it tells me that my boundary condition is equivalent  to 0 = 0, and I don't see why. Some other times it tells me I only gave 1 boundary/initial condition even if I wrote both. Here is what I wrote for example :

(because it kept asking me to add these two options : 'time' and 'range')

Are you familiar with these problems ? What would be the perfect syntax you would use to solve this ? I must at least have syntax problems because even if I keep reading the Help, it's been a long time since I used Maple.

Thank very much for any indication you could give me !


Try to consider the following system of differential equations:

sys := diff(U(ksi), ksi) = (y(ksi)-(1.5*(1+0.01*ksi))*U(ksi)/ksi)/(1.5+0.015*ksi+0.002*ksi^2),
diff(y(ksi), ksi) = U(ksi)*(0.002+(1.5*(1+0.01*ksi))*(0.002*ksi^2)/(ksi^2*(1.5+0.015*ksi+0.002*ksi^2))-19.3^2)-y(ksi)*(0.002*ksi^2)/(ksi*(1.5+0.015*ksi+0.002*ksi^2))

with the boundary conditions: cond:= y(0.8) = 0, y(1) = 0

And Maple gives me zero solution for this system , i mean U(from 0.8  to 1) = 0 and y(from 0.8 to 1) = 0

How can i get some other solutions?

P.S. i need numerical solution => dsolve( [sys,cond],type= numeric)

Please, i need some help.

Dear all,

I am trying to solve the following partial differential equation (transport or advection equation) with given initial and boundary conditions:

restart: with(PDEtools):
sys := [v*diff(u(x,t), x) + diff(u(x,t), t) = 0, u(x,0) = exp(-x), u(0,t) = sin(t)];

But it does not work. The solution is (or should be): 

u(x, t) = exp(t*v-x)+Heaviside(t-x/v)*(sin(t-x/v)-exp(t*v-x))

I think the reason is that the interval for t (in [0, inf)) and x (in [0, 1]) is not specified. On the other hand, this works:

restart: with(PDEtools):
sys := [diff(u(x, t), t) = diff(u(x, t), x, x), u(0, t) = 0, u(1, t) = 0, u(x,0) = f(x)];
sol := pdsolve(sys);

How can I solve a PDE like the transport equation with given initial AND boundary conditions?

Thanks a lot

hello everyone. I have an undergradute project i'm currently working on and I'm stuck where I have to use the Differential Transforms Method to solve a problem with boundary conditions at infinity


Digits := 5;

F[0] := 0; F[1] := 0; F[2] := (1/2)*A; T[0] := 1; T[1] := B; M := 2; S := 1;

for k from 0 to 10 do F[k+3] := (2*(sum((r+1)*F[r+1]*(k+1-r)*F[k+1-r], r = 0 .. k))-T[k]-3*(sum((k+1-r)*(k+2-r)*F[r]*F[k+2-r], r = 0 .. k))-M*(k+1)*F[k+1])*factorial(k)/factorial(k+3);

T[k+2] := (-3*(sum((k+1-r)*F[r]*T[k+1-r], r = 0 .. k))-S*T[k])*factorial(k)/factorial(k+2)

end do; f := 0; t := 0;

for k from 0 to 10 do

f := f+F[k]*x^k;

t := t+T[k]*x^k end do;


but the problem is that i cant seem to evaluate

or higer diagonal pade-approximant. any help will be greatly appreciated. thank you.

(in dsolve/numeric/bvp) initial Newton iteration is not converging.


     I'm trying to numerically solve a PDE in Maple for different boundary conditions, however I'm having trouble even getting Maple to numerically solve it for simple boundary conditions.

I have cylindrical coordinates, r, z, theta, and I treat r = r(z, theta) for convenience to plot my solution surface. The initial coundary condition is that at z = epsilon (z = 0 is singular) , r = constant and of course r is periodic in theta. This is just a circle, and the analytical solution is know to be a half-sphere  r = sqrt(R^2 - z^2). I entered my initial boundary conditions into Maple, but it doesn't like the periodic one

IBC := { r(epsilon, theta) = R - epsilon__r,
              r(z, 0) = r(z, 2*Pi) };

  indepvars = [z, theta],
  time = z,
  range = 0..2*Pi);
Error, (in pdsolve/numeric/par_hyp) Incorrect number of boundary conditions, expected 2, got 1

I'm not sure how to make this work, and then generalize it to more arbitrary intial slices r(epsilon, theta) = f(theta).

Here's the attached worksheet,

Any help is appreciated,


How do i proceed to solve two differential equations?

Two equations two unknowns is easy to solve in polynomial algebraic equations. Example: x+y=5; x-y=3; The solution is x=4; y=1 by adding the equations we arrive at.

The two equations are second order differential equations with two variables say temperature T (x,y) and velocity c(x,y). Assume any simple equation (one dimensional as well i.e. T(x) and c(x) which you can demonstrate with ease, I have not formulated the exact equations and boundary conditions yet for SI Engine simulation.

Thanks for comments, suggestions and answers expected eagerly.


I'm trying to execute the program, which can be found here , but it does not work. I copied exactly what is written there:

restart; with(PDEtools):
U := diff_table(u(x,t)):
pde[1] := U[t]+c*U[x]=-lambda*U[];
bc[1] := eval(U[], t=0) = phi(x);
sys[1] := [pde[1], bc[1]];

But after last command it just sais that

Error, (in pdsolve/sys/info) found functions with same name but depending on different arguments in the given DE system: [u(x,t), u(x,0)]

What's wrong?

hai everyone. i am currently trying to solve an integration of the following ∫g(η)dη . integrate from 0 to 10.

from the following odes.

f ''' +1-(f ')2 +ff ''=0,


with boundary conditions f(0)=0, f'(0)=λ, f'(∞)=1, g(0)=1,g(∞)=0

First, i solve the odes using the shooting method. then i used the trapezoidal rule to solve for the integration of g(eta) using the following codes

> with(student);
> trapezoid(g(eta), eta = 0 .. 10, 10);
> evalf(%);

it seems that it can not read the data from the shooting method. can anyone suggest why it is happening?

thank you verymuch for your concern :)

I try to solve a set of differential equations with boundary conditions by dsolve command but I got this error:


odes := D2*(diff(P(x), x))/((3*D1*a+4*D2)*P(x))-(diff(S(x), x))/(q*S(x)-1) = 0, diff(S(x), `$`(x, 2))+(diff(S(x), x))*cotx+4*pi*(3*D1*a+4*D1)*P(x)/((q*S(x)-1)*D2) = 0

ics := P((1/2)*pi) = 1, S((1/2)*pi) = -1, (D(S))((1/2)*pi) = 0, (D(P))((1/2)*pi) = 0

sol := dsolve({ics, odes}, numeric);
Error, (in dsolve/numeric/process_input) input system must be an ODE system, got independent variables {x, (1/2)*pi}


Does any body knows what the problem is??



1 2 3 4 5 6 Page 1 of 6