# Items tagged with differentialdifferential Tagged Items Feed

### Heun functions in Maple...

January 31 2015
0 0

At the internet site of The Heun Project, a strong declaration is made that only Maple incorporates Heun functions, which arise in the solution of differential equations that are extremely important in physics, such as the solution of Schroedinger's equation for the hydrogen atom.  Indeed solutions appear in Heun functions, which are highly obscure and complicated to use because of their five or six arguments, but when one tries to convert them to another function, nothing seems to work.  For instance, if one inquires of FunctionAdvisor(display, HeunG), the resulting list contains

"The location of the "branch cuts" for HeunG are [sic, is] unknown ..." followed by several other "unknown" and an "unable". Such a solution of a differential equation is hollow.

Incidentally, Maple's treatment of integral equations is very weak -- only linear equations with simple solutions, although procedures by David Stoutemyer from 40 years ago are available to enhance this capability.

When can we expect these aspects of Maple to work properly, for applications in physics?

### Solving a piecewise differential equation system...

January 16 2015
0 3

Hi there,

I've got the following differential equation system:,

dU/dt = delta·dotD -lambda·U - kappa·U^2
dL/dt = (1-phi)·lambda·U + 1/4 ·kappa·U^2

being phi, delta, kappa, lambda, kappa some fixed parameters of the system, and where dotD (the derivative wrt time of a function D), which is defined a piecewise funtion:

dotD(t)=1/(3·T1)·DT for t in [0,T1]

dotD(t)=2/(3·(T2-T1-T))·DT for t in [T1+T,T2]

where T and DT are also known, and T1 approaches 0, and T2 approaches T1+T.

Setting the equation system in Maple and trying to solve it, gives a NULL result. However, trying to solve each piece separately seems to work fine.

Why is this?

Furthermore, taking limits for the [T1+T,T2] part (having solved each piece separately) yields an invalid limits point error. Ain't the possibility to take limits for both parameters at the same time?

Any ideas?

This is the Maple worksheet: MaplePrimes_LQ_model_solve.mw

Thank you.

jon

### January’s Featured Live Webinars...

January 05 2015
0
0

Maplesoft regularly hosts live webinars on a variety of topics. Below you will find details on an upcoming webinars we think may be of interest to the MaplePrimes community.  For the complete list of upcoming webinars, visit our website.

Creating Questions in Maple T.A. – Part #2

This presentation is part of a series of webinars on creating questions in Maple T.A., Maplesoft’s testing and assessment system designed especially for courses involving mathematics. This webinar, which expands on the material offered in Part 1, focuses on using the Question Designer to create many standard types of questions. It will also introduce more advanced question types, such as sketch, free body diagrams, and mathematical formula.

The third and final webinar will wrap up the series with a demonstration of math apps and Maple-graded questions.

Clickable Calculus Series – Part #1: Differential Calculus

In this webinar, Dr. Lopez will apply the techniques of “Clickable Calculus” to standard calculations in Differential Calculus.

Clickable Calculus™, the idea of powerful mathematics delivered using very visual, interactive point-and-click methods, offers educators a new generation of teaching and learning techniques. Clickable Calculus introduces a better way of engaging students so that they fully understand the materials they are being taught. It responds to the most common complaint of faculty who integrate software into the classroom – time is spent teaching the tool, not the concepts.

### Analyzing a differential equation system with vary...

January 02 2015
0 5

Hi there,
I have a set of differential equations whose solution, Jacobian matrix and its eigenvalues, direction field, phase portrait and nullclines, need to be computed.

Each of the equations has a varying parameter.

I know how to get the above for a single parameter value, but when I set a range of values for the parameters, Maple is not able to handle all cases as I would expect: solving the differential equation system:

eq1 := x*(1.6*(1-(1/100)*x)-phi*y)
eq2 := (x/(15+x)-0.3e-1*x-.4)*y+.6+theta
desys := [eq1, eq2];
vars := [x, y];

Error, (in unknown) invalid input: Utilities:-SetEquations expects its 2nd argument, equations, to be of type set({boolean, algebraic, relation}), but received {-600*y+(Array(1..2, {(1) = 8400, (2) = 15900})), Array(1..5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0})}

The equations are the following:
de1 := diff(x(t), t) = x(t)*(1.6*(1-(1/100)*x(t))-phi*y(t));
de2 := diff(y(t), t) = (x(t)/(15+x(t))-0.3e-1*x(t)-.4)*y(t)+.6+theta

the parameters being:
phi:=[0 0.5 1 1.5 2]
theta:=[5. 10.]

How can I handle the situation so that Maple computes each of the above for each combination of the parameters?

I would like to avoid using two for loops and having to store all results in increasingly bigger and complicated arrays.

The worksheet at issue is this: MaplePrimes_Tumour_model_phi_theta_variation.mw

Thanks,
jon

### abs function dsolve...

December 30 2014
1 3

Hi all,

I am trying to solve the following differential equation numerically using dsolve,

y * abs (y''') = -1

y(0) =1, y'(0) = 0, y''(0)=0

it works fine when tthe absolute function is not there, i.e. yy''' = -1.

Do you have any suggestion?

### Compute and display isoclines (nullclines) for an ...

December 29 2014
0 2

Hi there,

I would like to compute and display the nullclines of a set of ordinary differential equations.

AFAIK, I can compute the nullclines in Maple by defining the equations and solving the system

e.g.:

# Define the equations
eq1 := u(t)*(1-u(t)/kappa)-u(t)*v(t) = 0;
eq2 := g*(u(t)-1)*v(t) = 0;

# Solve the system (i.e. compute the nullclines)
sol := solve({eq1, eq2}, {u(t), v(t)});

However, I am not quite able to imagine how to display them over a dfieldplot or a phaseportrait.

Attached is an example with some differential equations, and their vector field and trajectories: MaplePrimes_Predator_prey_model_nullclines.mw.

It can be use to illustrate how to (compute and) display the nullclines.

Thank you,

jon

### Solving non-linear ODE...

December 17 2014
2 22

Hi,

I'm trying to solve the following non-linear ODE numerically:

by ececuting

but maple gives me this error-message:

"Error, (in dsolve/numeric/make_proc) Could not convert to an explicit first order system due to 'RootOf'"

I couldnt find any useful information in the manual. What does this error mean? Is there something wrong with my maple code or is there just no solution for this particulare differential equation?

### solution of differential equations...

December 03 2014
1 1

The ability of Maple to solve differential equations is unsurpassed, but when the solutions appear in terms of Heun functions that result is disappointing because it is either difficult or impossible to convert those functions to other functions more commonly used and for which plots are readily generated.

Specifically, does any reader have a suggestion what to do with Heun C and Heun G functions?  In principle, they seem to be related to 1F1 and 2F1 hypergeometric functions, but the conversion seems not to succeed, and it is not obvious how to make it succeed.  In both cases of interest, the literature contains hints of solutions in other functions.

It seems that a solution of a differential equation in terms of Heun functions is not a solution at all.

### Substituting an expression into an expression...

November 22 2014
1 1

I'm trying to substitute one Differential equation into another differential equation.

eq1:=d*n(t)/dt = (rho(t)-beta)*n(t)/Lambda+lambda*C(t)+q

eq2:=diff(eq1, t)

resulting in -> eq2 := d*(diff(n(t), t))/dt = (diff(rho(t), t))*n(t)/Lambda+(rho(t)-beta)*(diff(n(t), t))/Lambda+lambda*(diff(C(t), t))

then I'm given that (diff(C(t), t)) is given by another equation:

eq3:=d*C(t)/dt = beta*n(t)/Lambda-lambda*C(t)

At this point I'm trying to substitute equation 3 into equation 2 for diff(C(t),t)

eq4 := subs(diff(C(t), t) = rhs(eq2), eq5)

however no matter what way's I try this I get an error:

Error, (in simpl/reloprod) invalid terms in product: (d*(diff(n(t), t))/dt = (diff(rho(t), t))*n(t)/Lambda+(rho(t)-beta)*(diff(n(t), t))/Lambda+lambda*(diff(C(t), t)))^-1

I then tried to map it but again i got an error specifically about the first parameter:

Error, invalid operator parameter name

eq5:=map((d/dt C(t))->beta/Lambda*n(t)-lambda*C(t),eq2)

I'm just wondering if what I am trying to do is even possible in Maple?

If anyone can help I would greatly appreciate it!

November 08 2014
0 0

### Solving a combined system of differential and part...

September 19 2014
1 4

Dear Maple enthusiasts,

I am unable to find a working method to solve a system of 8 equations, of which 4 are differential equations. The system contains 8 unknown variables and the goal is to find an expression for each of these variables as a function of the time t. I have attached the code of my project at the bottom of this message.

I have tried the following:

1. Using solve/dsolve to solve all 8 equations at once. This results in Maple eating up all of my memory and never finishing its calculations.
2. First using solve to solve the 4 non-differential equations so that I get 4 out of 8 variables as a function of the 4 remaining variables. This results in an expression containing RootOf() for each of the 4 veriables I'm solving for, which prevents me from using these expressions in the 4 remaining differential equations.
3. First using dsolve to solve the differential equations, which gives once again an expression for 4 variables as a function of the 4 remaining variables. I then use solve to solve the 4 remaining equations with the new found expressions. This results in an extremely long solution for each of the variables.

The code below contains the 3rd option I tried.

Any help or suggestions would be greatly appreciated. I have been scratching my head so much that I'm getting bald and whatever I search for on google or in the Maple help, I can't find a good reference to a system of differential equations together with other equations.

 > restart:

PARK - Mixed control

Input parameters

Projected interface area (m²)

 > A_int:=0.025^2*Pi:

Temperature of the process (K)

 > T_proc:=1873:

Densities (kg/m³)

 > Rho_m:=7000: metal
 > Rho_s:=2850: slag

Masses (kg)

 > W_m:=0.5: metal
 > W_s:=0.075: slag

Mass transfer coefficients (m/s)

 > m_Al:=3*10^(-4):
 > m_Si:=3*10^(-4):
 > m_SiO2:=3*10^(-5):
 > m_Al2O3:=3*10^(-5):

Weight percentages in bulk at t=0 (%)

 > Pct_Al_b0:=0.3:
 > Pct_Si_b0:=0:
 > Pct_SiO2_b0:=5:
 > Pct_Al2O3_b0:=50:

Weight percentages in bulk at equilibrium (%)

 > Pct_Al_beq:=0.132:
 > Pct_Si_beq:=0.131:
 > Pct_SiO2_beq:=3.13:
 > Pct_Al2O3_beq:=52.12:

Weight percentages at the interface (%)

Constants

Atomic weights (g/mol)

 > AW_Al:=26.9815385:
 > AW_Si:=28.085:
 > AW_O:=15.999:
 > AW_Mg:=24.305:
 > AW_Ca:=40.078:

Molecular weights (g/mol)

 > MW_SiO2:=AW_Si+2*AW_O:
 > MW_Al2O3:=2*AW_Al+3*AW_O:
 > MW_MgO:=AW_Mg+AW_O:
 > MW_CaO:=AW_Ca+AW_O:

Gas constant (m³*Pa/[K*mol])

 > R_cst:=8.3144621:

Variables

 > with(PDEtools): declare((Pct_Al_b(t),Pct_Al_i(t),Pct_Si_b(t),Pct_Si_i(t),Pct_SiO2_b(t),Pct_SiO2_i(t),Pct_Al2O3_b(t),Pct_Al2O3_i(t))(t),prime=t):

Equations

4 rate equations

 > Rate_eq1:=diff(Pct_Al_b(t),t)=-A_int*Rho_m*m_Al/W_m*(Pct_Al_b(t)-Pct_Al_i(t));

 > Rate_eq2:=diff(Pct_Si_b(t),t)=-A_int*Rho_m*m_Si/W_m*(Pct_Si_b(t)-Pct_Si_i(t));

 > Rate_eq3:=diff(Pct_SiO2_b(t),t)=-A_int*Rho_s*m_SiO2/W_s*(Pct_SiO2_b(t)-Pct_SiO2_i(t));

 > Rate_eq4:=diff(Pct_Al2O3_b(t),t)=-A_int*Rho_s*m_Al2O3/W_s*(Pct_Al2O3_b(t)-Pct_Al2O3_i(t));

3 mass balance equations

 > Mass_eq1:=0=(Pct_Al_b(t)-Pct_Al_i(t))+4*AW_Al/(3*AW_Si)*(Pct_Si_b(t)-Pct_Si_i(t));

 > Mass_eq2:=0=(Pct_Al_b(t)-Pct_Al_i(t))+4*Rho_s*m_SiO2*W_m*AW_Al/(3*Rho_m*m_Al*W_s*MW_SiO2)*(Pct_SiO2_b(t)-Pct_SiO2_i(t));

 > Mass_eq3:=0=(Pct_Al_b(t)-Pct_Al_i(t))+2*Rho_s*m_Al2O3*W_m*AW_Al/(Rho_m*m_Al*W_s*MW_Al2O3)*(Pct_Al2O3_b(t)-Pct_Al2O3_i(t));

1 local equilibrium equation

Gibbs free energy of the reaction when all of the reactants and products are in their standard states (J/mol). Al and Si activities are in 1 wt pct standard state in liquid Fe. SiO2 and Al2O3 activities are in respect to pure solid state.

 > delta_G0:=-720680+133*T_proc:

Expression of mole fractions as a function of weight percentages (whereby MgO is not taken into account, but instead replaced by CaO ?)

 > x_Al2O3_i(t):=(Pct_Al2O3_i(t)/MW_Al2O3)/(Pct_Al2O3_i(t)/MW_Al2O3 + Pct_SiO2_i(t)/MW_SiO2 + (100-Pct_SiO2_i(t)-Pct_Al2O3_i(t))/MW_CaO); x_SiO2_i(t):=(Pct_SiO2_i(t)/MW_SiO2)/(Pct_Al2O3_i(t)/MW_Al2O3 + Pct_SiO2_i(t)/MW_SiO2 + (100-Pct_SiO2_i(t)-Pct_Al2O3_i(t))/MW_CaO);

Activity coefficients

 > Gamma_Al_Hry:=1: because very low percentage present  during the process (~Henry's law)
 > Gamma_Si_Hry:=1: because very low percentage present  during the process (~Henry's law)
 > Gamma_Al2O3_Ra:=1: temporary value!
 > Gamma_SiO2_Ra:=10^(-4.85279678314968+0.457486603678622*Pct_SiO2_b(t)); very small activity coefficient? plot(10^(-4.85279678314968+0.457486603678622*Pct_SiO2_b),Pct_SiO2_b=3..7);

Activities of components

 > a_Al_Hry:=Gamma_Al_Hry*Pct_Al_i(t); a_Si_Hry:=Gamma_Si_Hry*Pct_Si_i(t); a_Al2O3_Ra:=Gamma_Al2O3_Ra*x_Al2O3_i(t); a_SiO2_Ra:=Gamma_SiO2_Ra*x_SiO2_i(t);

Expressions for the equilibrium constant K

 > K_cst:=exp(-delta_G0/(R_cst*T_proc));
 > Equil_eq:=0=K_cst*a_Al_Hry^4*a_SiO2_Ra^3-a_Si_Hry^3*a_Al2O3_Ra^2;

Output

 > with(ListTools): dsys:=Rate_eq1,Rate_eq2,Rate_eq3,Rate_eq4: dvars:={Pct_Al2O3_b(t),Pct_SiO2_b(t),Pct_Al_b(t),Pct_Si_b(t)}: dconds:=Pct_Al2O3_b(0)=Pct_Al2O3_b0,Pct_SiO2_b(0)=Pct_SiO2_b0,Pct_Si_b(0)=Pct_Si_b0,Pct_Al_b(0)=Pct_Al_b0: dsol:=dsolve({dsys,dconds},dvars):
 > Pct_Al2O3_b(t):=rhs(select(has,dsol,Pct_Al2O3_b)[1]); Pct_Al_b(t):=rhs(select(has,dsol,Pct_Al_b)[1]); Pct_SiO2_b(t):=rhs(select(has,dsol,Pct_SiO2_b)[1]); Pct_Si_b(t):=rhs(select(has,dsol,Pct_Si_b)[1]);
 > sys:={Equil_eq,Mass_eq1,Mass_eq2,Mass_eq3}: vars:={Pct_Al2O3_i(t),Pct_SiO2_i(t),Pct_Al_i(t),Pct_Si_i(t)}: sol:=solve(sys,vars);

,

### Inverse Operator Method of Operator D...

August 03 2014
1 4

Dear all,

It's very convenient to define a DE or PDE through Differential Operator D, for example,

((D[1, 1]+D[1, 2]+D[2, 2])(z))(x, y) = exp(x)*sin(y)

Is it possible to realize Inverse Operator Method of Operator D? How to solve the following equation if we rewrite the pde through inverse operator method?

(z)(x, y)=((D[1, 1]+D[1, 2]+D[2, 2])^(-1))exp(x)*sin(y)

Thanks a lot.

### Error, (in dsolve/numeric/bvp) system is singular ...

July 22 2014
0 0

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);

dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, numeric, output = array([0.]));

Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead

****************FORMAT TWO ********************************************************

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);
dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, method = bvp[midrich], output = array([0.]));
%;
Error, (in dsolve) too many levels of recursion

THANKS A LOT

### Is it possible to solve piecewise differential equ...

July 12 2014
1 5

Is it possible to solve piecewise differential equations directly instead of separating the pieces and solving them separately.

like for example if i have a two dimensional function f(t,x) whose dynamics is as follows:

dynamics:= piecewise((t,x) in D1, pde1, pde2); where D1 is some region in (t,x)-plane

now is it possible to solve this system with one pde call numerically?

pde(dynamics, boundary conditions, numeric); doesnot work