Items tagged with dsolve dsolve Tagged Items Feed

Hello everybody. I'm newbie and my english are not very good. Please help me debug an error in my files DSOLVE_NOT_SUCCESSFULL.zip: "Error, (in ans) cannot determine if this expression is true or false"
Thanks.

Dear all,

restart:with(plots):
eq1:=diff(f(y), y$4)-(diff(f(y), y$2));

bcs:=f(h1) = (1/2), f(h2) = -(1/2), (D(f))(h1) = -1, (D(f))(h2) = -1:

h1:= 1+cos(x):h2:=-1-cos(x+g):

db:=eq1,bcs:
d1 := subs(g=1,[db]):
P1:= eval(diff(diff(f(y),y$2)-f(y),y));

for x from 0 to 1 by 0.1 do
F2[x]:=dsolve(d1, numeric,maxmesh=25500,output=listprocedure): 
P2[x]:=subs(F2[x],P1); # subing values into P1 
end do:
Vls:=Vector([seq(P2[x],x=0..1,0.1)]):
XX := `<|>`(`<,>`(seq(x, x = 0..1, 0.1))):
plot(<<XX>|<Vls>>, color=red);

I'm trying to plot P1 vs x but getting empty plot. Please help me out. 

Thanks

 

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);

,


Download Park_-_mixed_control_model.mw

Empty output with dsolve?...

September 05 2014 J4James 175

restart:

Eq1:=(-1/k)*B*(diff(-f(r),r$3)-(1/(r+k)^2)*diff(f(r),r$1)+(1/(r+k))*diff(f(r),r$2)+(1/(r+k)^2))

-((r+k)/k)*B*(diff(-f(r),r$4)+(2/(r+k)^3)*diff(f(r),r$1)-(2/(r+k)^2)*diff(f(r),r$2)+(1/(r+k)^2)*diff(f(r),r$3)

-(2/(r+k)^3));

bcs:=f(-h)=1/2,(D@@1)(f)(-h)=1,f(h)=-1/2,(D@@1)(f)(h)=1;

dsolve({Eq1,bcs},f(r));

Please have a look.

Thanks

Hi

I'm dealing with 2nd order ODE on Maple. By using " infolevel 5" Maple tell me that it use Kovacic's algorithm to find the solution. Could anybody tell me how or at least some idea so that I can go on this my self. Following here my ODE

Thank you so much

Chaimongkol

Hello! How can I find extremes of numeric solution of ODE system obtained using "dsolve"? Can I use something like "extrema" function?

Is this a  false positive, where Maple is solving an ODE which is supposed to be unsolvable?

Accoding to http://www.maplesoft.com/compare/mathematica_analysis/Comparison_Maple_Mathmatica_DEs_Kamke.pdf and considering ODE 13

Maple 18.01 does give an answer for the above ODE. I verfied the ODE from the book as well. The answer returned by Maple is very large, but it does solve it in 195 CPU seconds. Therefore the question is: Is this a false result? Or is the above document have an error in it and ODE 13 is actually solvable?

restart;
ode:=diff(y(x), x$2)-(a*y(x)^2+b*x*y(x)+c*x^2+alpha*y(x)+beta*x+gamma)^(-3/2);
sol:=dsolve(ode,y(x)) assuming a::NonZero; #I get an answer with or without this assumption. The book has the assumption
odetest(sol,ode);

btw,

 odetest(sol,ode)

gives an error as well. May be this is related to the issue or not. Not sure now.

Hi:

when use the dsolve,numeric,I see error,why?

f := (x, t) -> piecewise(t < 10, 0.480e9*(1-(1/10)*t)*sin(Pi*x), 10 < t, 0)

eq1 := diff(y(t), t, t)-y(t)^2-f(x,t) = 0:
eq2 :=simplify( int(lhs(eq1)*sin(Pi*x), x = 0 .. 1) = 0):

dsolve({eq2, y(0) = 0, (D(y))(0) = 0}, numeric)

initial conditions are zero.

 

 

I want to get numerical solution of the Eqs.ode(see the folowlling ode and ibc)in Maple.However,when i run the following procedure,it prompts an error "Error, (in dsolve/numeric/bvp) cannot determine a suitable initial profile, please specify an approximate initial solution". How to solve the issue? Please help me.


restart:
n := 1.4; phi := 1; beta := .6931; psi := 1

> restart;
> n := 1.4; phi := 1; beta := .6931; psi := 1;

> s := proc (x) options operator, arrow; evalf(1+(phi*exp(beta*psi)*h(x))^n) end proc;

> Y := proc (x) options operator, arrow; evalf(f-(1/2-(1/2)/n)*ln(s(x))+2*ln(1-(1-s(x))^(-1+1/n))) end proc;


> ode := diff(h(x), `$`(x, 2))+(diff(Y(x), x))*(diff(h(x), x)+1) = 0;


> ibc := h(0) = 0, ((D(h))(10)+1)*s(10)^(-(1-1/n)*(1/2))*(1-(1-1/s(10))^(1-1/n))^2 = 0;

> p := dsolve({ibc, ode}, numeric);
Error, (in dsolve/numeric/bvp) cannot determine a suitable initial profile, please specify an approximate initial solution
>

Good day,

What scheme does midrich method is using in solving BVP?

Thanks.

I have few ode's which are solved by dsolve, but I am not able to get a zero from odetest(sol,ode). I tried the implicit option on the one which returns implicit solution, but I still do not get zero. I tried useInt as well.

Is there something else to do to verify the solution? My understanding is that if Maple returns a solution from dsolve, there there should be a way to get odetest() to verify the solution, but I could be wrong. Here are few examples, I have more if needed. This is Maple 18.01 on windows 7

restart;
MathematicalFunctions:-Version();
#       "C:\Program Files\Maple 18\lib\DEsAndMathematicalFunctions18.mla", `2014, July 25, 21:22 hours`
unassign(`print/ODESolStruc`):
ode1:=diff(y(x), x)+2*tan(y(x))*tan(x)-1:
ode2:=2*(diff(y(x), x))-3*y(x)^2-4*a*y(x)-b-c*exp(-2*a*x):
ode3:=(x^2+1)*(diff(y(x), x))+(y(x)^2+1)*(2*x*y(x)-1):
ode4:=x^7*(diff(y(x), x))+(2*(x^2+1))*y(x)^3+5*x^3*y(x)^2:
ode5:=(y(x)-x)*sqrt(x^2+1)*(diff(y(x), x))-a*sqrt((y(x)^2+1)^3):

sol1:=dsolve(ode1,y(x)):
sol2:=dsolve(ode2,y(x)):
sol3:=dsolve(ode3,y(x)):
sol4:=dsolve(ode4,y(x)):
sol5:=dsolve(ode5,y(x)):

odetest(sol1,ode1,implicit);  #not zero
odetest(sol2,ode2);             #not zero
odetest(sol3,ode3,implicit);  #not zero
odetest(sol4,ode4,implicit);  #not zero
odetest(sol5,ode5,implicit);  #not zero

I am going by the assumption that when Maple returns ODESolStruct as solution, then it means it could not solve the ODE. (example below)

My only complaint is that the syntax it uses for saying that the solution is ODESolStruct is not clear. I guess one has to look for & in the solution to know the result is ODEStruct.

http://www.maplesoft.com/support/help/Maple/view.aspx?path=dsolve%2fODESolStruc

Only when I convert the solution to string, then I can see the word "ODESolStruct" displayed.

My question is, how can I make maple display on the screen the word "ODESolStruct" in the solution, instead of using those "&" As that will make it more clear.

I am using worksheet on maple 18. Not document style. Here is an example:

restart;
ode:=diff(y(x),x$2)+a*exp(x)*sqrt(y(x));
sol:=dsolve(ode,y(x));


 The above was using 2D math display as default. If I use Maple notation as output I get:

----------------------------------------

restart:
ode:=diff(y(x),x$2)+a*exp(x)*sqrt(y(x)):
sol:=dsolve(ode,y(x));
sol := y(x) = `&where`(_a/exp(-2*(Int(_b(_a), _a))-2*_C1), [{diff(_b(_a), _a).......

-------------------------------------------

But now

convert(sol,string);
"y(x) = ODESolStruc(_a/exp(-2*Int(_b(_a),_a)-2*_C1),[{diff(_b(_a\ .............."

You can see now that the solution is ODESolStruct, but it is much more clear than the default solution above. But only when looking at the solution as string do I get it to show the word "ODESolStruct". 

Since odetest does not return zero, then maple did not solve it:

odetest(sol,ode);

btw, Compare the above to when Maple returns "DESol" structutre. In this case, it does now display on the screen the word "DESol":

restart;
ode:=diff(y(x), x, x)-y(x)*(a^2*x^(2*n)-1);
dsolve(ode,y(x));

Again, my question is:  Could I configure Maple to display in worksheet the solution using explicit ODESolStruct words instead of using "&" there to indicate more clearly the solution.

 

Maple 18.01, windows

restart;
ode:=2*a^2*y(x)-2*y(x)^3+3*a*(diff(y(x), x))+diff(y(x), x$2)=0;
dsolve(ode,y(x));

           returns y(x)=0

 

So does

ode:=2*a^2*y(x)-20*y(x)^3+3*a*(diff(y(x), x))+diff(y(x), x$2)=0;

ode:=2*a^2*y(x)-200*y(x)^3+3*a*(diff(y(x), x))+diff(y(x), x$2)=0;

ode:=2*a^2*y(x)-2000*y(x)^3+3*a*(diff(y(x), x))+diff(y(x), x$2)=0;

etc...

Is this a bug?

 

 

 

I am a problem with solve differential equation, please help me: THANKS 

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

I DONT KNOW ABOUT THIS ERROR

PLEASE HELP ME

THANKS A LOT

 

question on DESol...

July 21 2014 nm 600

restart;
ode:=diff(y(x), x, x)-y(x)*(a^2*x^(2*n)-1);
dsolve(ode,y(x));

gives

     DESol({diff(_Y(x), x, x)+(-a^2*x^(2*n)+1)*_Y(x)}, {_Y(x)})

as answer. I read the help on DESol, but what does the above actually mean? Where is the solution of the ode? It just returned the ode back to me. Can I consider that Maple did not solve this ode in this case?

from help

"DESol is a data structure to represent the solution of a differential equation. It is to dsolve as RootOf is to solve."

 

 

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