Items tagged with numerical numerical Tagged Items Feed

Hello everyone !

I have a problem when I want to calculate the following multiple integration numerically:


It doesn't work. But when I replace sum(x[i],i=1..6)^2 with sum(x[i],i=1..6), it works. Is there any feasible solution to my problem ?

Thank you for reading !


Dear Friends

            Hope everything going fine with you. I want the numerical solution of nonlinear system of ordinary differential equations using RK method. The system of ODEs and their required results are present in attached file. I am waiting your quick response.


With my best regards and sincerely.

Mob #: 0086-13001903838

My goal is to plot the integral J with respect to t and as you can see J is a piecewise function.

This is my code.


Actually it's a problem about adiabatic invariants.

If you want to know the backgroud please see this link.

I have the solution to a heat PDE, v and the error esitmate u + cos(x+t) = v


I want to plot log v(1,t) as function of log u(1,t) in maple, but I seem to get an error:

Error, (in plot) unexpected option: ln(u(1, t))


I am attaching my code below.

How to fix this problem?

Thanks in advance.

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 !



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 !


hi every one..

how i solve numerically  couple equations which attached below .in solve this equation we must  starting from a very small value of V(voltage) with initial guesses for x1 and x3

near zero and using find root is noted that  the solution at this voltage step are used as initial guesses

for the next voltage step, and the process is repeated..


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? 


I am considering the following PDE and I am getting an error, please suggest a better numerical method than the default one used in maple:


the PDE is:

u_{xx}u^3 - sin(xt)u_{tt} = u(x,t)

u(x, 0) = sin(x), (D[2](u))(x, 0) = cos(x), u(0, t) = cos(t), (D[1](u))(0, t) = sin(t)

Please suggest me a method that will also work for the following PDEs:

u^m* u_{xx} - sin(xt)u_{tt} = u^n

for m,n =0,1,2,3,... for the cases m=n and m not equal n

Here's the code:


pde := u(x, t)^3*(diff(u(x, t), x, x))-sin(x*t)*(diff(u(x, t), t, t)) = u(x, t);

u(x, t)^3*(diff(diff(u(x, t), x), x))-sin(x*t)*(diff(diff(u(x, t), t), t)) = u(x, t)


ibc := u(x, 0) = sin(x), (D[2](u))(x, 0) = cos(x), u(0, t) = cos(t), (D[1](u))(0, t) = sin(t);

u(x, 0) = sin(x), (D[2](u))(x, 0) = cos(x), u(0, t) = cos(t), (D[1](u))(0, t) = sin(t)


pds := pdsolve(pde, [ibc], numeric, time = t, range = 0 .. 1, spacestep = 0.1e-1)

module () local INFO; export plot, plot3d, animate, value, settings; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; end module


pds:-plot3d(u(x, t), t = 0 .. 1, x = 0 .. 1, labels = [t, x, u(x, t)], labelfont = [times, bold, 20], axesfont = [times, bold, 16])

Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.0):
Newton iteration is not converging





I have an arrays of data. One for x values, and one for y values. How can I obtain a numerical integration of y for a range of x values?

I have tried defining a function of X using ArrayInterpolation(x,y,X) and then calling evalf(Int(f,xmin..xmax)) but that gives an error message. (I don't seem to be able to paste into this window) The error message says

"Error, invalid input: evalf expects its 2nd argument, n, to be of type posint, but received numeric."

I thought I was using a form of the equation right from the help system.

I also tried the 2D version of integration, but it returns the difference of my limits times my function name.

I aslo tried AdaptiveQuadrature, but I can't get that to work either.

-Mike McDermott

Newbie Maple user



I want to solve numerically the nonlinear pde:


u_x+u_t - (u_{xt})^2 = u(x,t)


which method do you propose me to use with maple? (I don't mine about which boundary conditions to be used here).


I have the following integral equation to solve numerically:


v(x,t)=1 - h*\int_0^t JacobiTheta0(1/2x , \pi i s) v^4(1,t-s)ds

where h is a numerical parameter, and v(1,t) = 1-h*\int_0^t \theta_3(r)v^4(1,t-r)dr (theta3 is Jacobi theta3 function).


So I want to use an iteration method that will converge numerically to the solution, where v(1,0)=1.

How to use maple for this?

I want also to find the rate of convergence to the numerical solution.

 edit: I should note that v(x,0)=1, even though it's implied from v(x,t) above.



sorry for that question, i'm a beginner in maple but i think my question is not as simple.

So, i want to solve numerically this first equation :

but the second term is present only if k*(U*t-x)>μc*m*g  (stick-slip problem)

initial conditions : U=1m/s; x=0m; k=10 for example

My problem is simple, i don't know how to use conditional statement for such an ode in maple.

I've tried > Xr := U*t-x;
> k := 10; m := 1; g := 10; mu := .2;
> if k*Xr > mu*m*g then ode1 := m*(diff(x(t), t, t)) = k.Xr-mu*m*g else ode1 := m*(diff(x(t), t, t)) = k.Xr end if;

But, of course, too optimistic.

Thank to anyone who will solve that (isuppose) simple problem



This is the system of equations in term of sin and cos. I have used the command "solve" in Maple but it yielded only 2 solutions. I've tried to use with(RealDomain): It yielded more solutions but most of them were wrong.



f1 := -8100+(-30+70*cos(t1)-40*cos(t2))^2+(-70*sin(t1)+40*sin(t2))^2

f2 := (-20-80*cos(t3))^2+(-15+70*cos(t1)+10*cos(t1+t))^2+(-70*sin(t1)-10*sin(t1+t)+80*sin(t3))^2-5625

f3 := (-20-80*cos(t3))^2+(15+40*cos(t2)+10*cos(t1+t))^2+(-40*sin(t2)-10*sin(t1+t)+80*sin(t3))^2-5625

f4 := 10*cos(t1+t)*(30-70*cos(t1)+40*cos(t2))-10*sin(t1+t)*(70*sin(t1)-40*sin(t2))


Anybody know how to solve this system of equations to get the full set of roots?

Thank you very much in advance.

Dear Friends:

I am currently working on a calculation for phase velocity of acoustic waves and don’t get along.  

My equation has the following form:

equ := tan( (31 / 20000) * sqrt( -9610000/c^2 + 1) / Pi) / tan((961/1260000) * sqrt( -39690000/c^2 + 1)/ P i) = -(1191640000/63)*sqrt(-9610000/c^2 + 1)*sqrt (-39690000/c^2 + 1)/ (c^2*(19220000/c^2 - 1)^2)

Using ‘sol = solve(equ,c)’ returns

sol := 96100* RootOf(1 + (400000000 * Pi^2 * RootOf(40320000000000000000 * Pi^4 * tan(_Z)*_Z^4256000000000000 * Pi^3 * csgn(_Z) * _Z^3 * tan((1/157500) * sqrt(24806250000 * Pi^2 * _Z^2 - 45167) / Pi) * sqrt(24806250000 * Pi^2 * _Z^2 - 45167) -96868800000000 * Pi^2 * tan(_Z) * _Z^2 + 615040000 * Pi * csgn(_Z) * _Z * tan((1/157500) * sqrt(24806250000 * Pi^2 * _Z^2 - 45167) / Pi ) * sqrt(24806250000 * Pi^2 * _Z^2 - 45167)+58181823 * tan(_Z))^2 - 961)* _Z^2)

c should be in a range of 13,000.

Two questions:

1) How can I deal with _Z?

2) Any suggestion how I can calculate ‘c’? Maybe numerical?

I am relative new in maple…

Many thanks!


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