Items tagged with solve solve Tagged Items Feed

I have a large system of linear algebraic equations that I want to solve (2005 Unknowns, 2005 Equations). I was wondering that what are the proper commands to use in maple for solving the system as fast as possible. Take a look at the files in the download link if you want to see the system of linear algebraic equations.

http://pc.cd/h79

Please provide me any suggesitons that you may think will be helpful like using other sofwares that are good in doing this work such as MATLAB or something else.


Thanks in Advance




Hello Dears

I have this equation

                                          (Napla)^4 * F(x,y) + k^2 *  (Napla)^2 * F(x,y)= 0,      (1)

which may be written as a non-homgeneous Helmholtz equation as

                                          (Napla)^2 * F(x,y) + k^2 * F(x,y)= g(x,y),                (2)

where the function g(x,y) is a harmonic function and (Napla)^2 is the laplace's operator in two dimension.

Can Maple solve equation (1), it will be better. If not may be solve equation (2).

 

How do i use d'Alembert formula to solve,plot and animate with Maple software

Every time I try to solve for a variable it gives me an arrow.

ex solve(5.6*10^-4=((x)(x))/(0.2-x),x)

gives me

x -> 7/62500 - 7/12500 x

How do I get it to stop giving me the x -> ?

Or at least reset some options so I don't have to reinstall the whole thing?

solve([b+c = a*a1+b*a4+c*a7, a+c=a a2+b a5+c a8, a+b = a*a3+b*a6+c*a9], [a1,a2,a3,a4,a5,a6,a7,a8,a9]);

how to assume a1 to a9 are 0 or 1

and find one of possible matrix is

Expected Result := Matrix([[1,1,0],[1,0,1],[0,1,1]]);

is it possible to assume element of matrix 0 or 1

how to write?

after write this, is it possible to display possible matrices which each element is 0 or 1

with(LinearAlgebra):
GetRing := proc(sol)
ringequation := 0;
mono1 := 0;
for j from 1 to 3 do
mono1 := 1;
for i from 1 to nops(sol[1][j]) do
mono1 := mono1*op(i, sol[1][j]);
od:
ringequation := ringequation + mono1;
od:
return ringequation;
end proc;
M := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);
sys := a*b+a = GetRing(MatrixMatrixMultiply(Matrix([[a,b,c]]), M));
solve(sys);

teliko.mwMapl_doc.docxHello,

After I have substitute all the variables by hand ,maple still continious  processing(27 hours and still evaluating)for a simple

summarisation by the time that live math2 needed only 2 mins.Have i done something wrong?I want to solve the following equation which is shown in the attached file with the experimental data

Hello guys

I have a question:

I have an equation like below. Always it has different order for example :

T1:=q3*(r^6)+q2*(r^4)+q1*(r^2)+q0:
solve(T1=0,r):
and sometimes:

T2:=q5*(r^4)+q6*(r^2)+q7:
solve(T2=0,r):
q0,q1,q2,q3,q4,q5,q6 and q7 are constants.

We know that for T1 It has two real answer and for T2 we have any real answer.

How can I specify generally the real answers for all of them?

I want to use these real answer for another equation.

Thanks

To me the following behavior of solve is surprising:

restart;
solve(f(0.5)=7,f(0.5)); #Output NULL
solve(f(1/2)=7,f(1/2)); #Output as expected 7

Debugging solve suggested to me that the following might work
solve(f(0.5)=7,f(1/2));
and indeed it did (outout the float 7.).
This behavior seems to have started in Maple 10. I checked Maple V,R3 and several other old versions including Maple 9.5. All behaved as I would have expected. MapleV,R3 gave the float 7. in the first case, the other the integer 7.
I take this to be a bug and shall file an SCR.
Any comments?




This application creates DNG matrices by optimizing Delta E from a raw photo of x-rites color checker. The color temperature for the photograph is also estimated.  Inputs are raw data from RawDigger and generic camera color response from DXO Mark.

Initialization

   

NULL

NULL

NULL

NULL

NULL

XYZoptical to RGB to XYZdata

 

 

Sr,g,b is the relative spectral transmittance of the filter array not selectivity for XY or Z of a given color.

Pulling Sr,g,b out of the integral assumes they are scalars. For example Sr attenuates X, Y and Z by the same amount.

Raw Balance is not White Point Adaptation.

The transmission loss of Red and Blue pixels relative to green is compensated by D=inverse(S). The relation to incident chromaticity, xy is unchanged as S.D=1.

(See Bruce Lindbloom; "Spectrum to XYZ" and "RGB/XYZ Matrices" also, Marcel Patek; "Transformation of RGB Primaries")

 

 

X = (Int(I*xbar*S, lambda))/N:

Y = (Int(I*ybar*S, lambda))/N:

Z = (Int(I*zbar*S, lambda))/N:

N = Int(I*ybar, lambda):

• 

XYZ to RGB

(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb})) = (Matrix(3, 3, {(1, 1) = XR*Sr, (1, 2) = YR*Sr, (1, 3) = ZR*Sr, (2, 1) = XG*Sg, (2, 2) = YG*Sg, (2, 3) = ZG*Sg, (3, 1) = XB*Sb, (3, 2) = YB*Sb, (3, 3) = ZB*Sb})).(Vector(3, {(1) = X_Tbb, (2) = Y_Tbb, (3) = Z_Tbb}))

NULL

(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb})) = (Matrix(3, 3, {(1, 1) = Sr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Sg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Sb})).(Matrix(3, 3, {(1, 1) = XR, (1, 2) = YR, (1, 3) = ZR, (2, 1) = XG, (2, 2) = YG, (2, 3) = ZG, (3, 1) = XB, (3, 2) = YB, (3, 3) = ZB})).(Vector(3, {(1) = X_Tbb, (2) = Y_Tbb, (3) = Z_Tbb}))

 

Camera_Neutral = (Matrix(3, 3, {(1, 1) = Sr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Sg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Sb})).(Matrix(3, 3, {(1, 1) = XR, (1, 2) = YR, (1, 3) = ZR, (2, 1) = XG, (2, 2) = YG, (2, 3) = ZG, (3, 1) = XB, (3, 2) = YB, (3, 3) = ZB})).(Vector(3, {(1) = X_wht, (2) = Y_wht, (3) = Z_wht}))

NULL

NULL

NULL

• 

RGB to XYZ (The extra step of adaptation to D50 is included below)

 

(Vector(3, {(1) = X_D50, (2) = Y_D50, (3) = Z_D50})) = (Matrix(3, 3, {(1, 1) = XTbbtoXD50, (1, 2) = YTbbtoXD50, (1, 3) = ZTbbtoXD50, (2, 1) = XTbbtoYD50, (2, 2) = YTbbtoYD50, (2, 3) = ZTbbtoYD50, (3, 1) = XTbbtoZD50, (3, 2) = YTbbtoZD50, (3, 3) = ZTbbtoZD50})).(Matrix(3, 3, {(1, 1) = RX*Dr, (1, 2) = GX*Dg, (1, 3) = BX*Db, (2, 1) = RY*Dr, (2, 2) = GY*Dg, (2, 3) = BY*Db, (3, 1) = RZ*Dr, (3, 2) = GZ*Dg, (3, 3) = BZ*Db})).(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb})) NULL

NULL

(Vector(3, {(1) = X_D50, (2) = Y_D50, (3) = Z_D50})) = (Matrix(3, 3, {(1, 1) = XTbbtoXD50, (1, 2) = YTbbtoXD50, (1, 3) = ZTbbtoXD50, (2, 1) = XTbbtoYD50, (2, 2) = YTbbtoYD50, (2, 3) = ZTbbtoYD50, (3, 1) = XTbbtoZD50, (3, 2) = YTbbtoZD50, (3, 3) = ZTbbtoZD50})).(Matrix(3, 3, {(1, 1) = RX, (1, 2) = GX, (1, 3) = BX, (2, 1) = RY, (2, 2) = GY, (2, 3) = BY, (3, 1) = RZ, (3, 2) = GZ, (3, 3) = BZ})).(Matrix(3, 3, {(1, 1) = Dr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Dg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Db})).(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb}))

NULL

(Vector(3, {(1) = X_D50, (2) = Y_D50, (3) = Z_D50})) = (Matrix(3, 3, {(1, 1) = RX_D50, (1, 2) = GX_D50, (1, 3) = BX_D50, (2, 1) = RY_D50, (2, 2) = GY_D50, (2, 3) = BY_D50, (3, 1) = RZ_D50, (3, 2) = GZ_D50, (3, 3) = BZ_D50})).(Matrix(3, 3, {(1, 1) = Dr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Dg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Db})).(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb}))

NULL

(Vector(3, {(1) = X_D50wht, (2) = Y_D50wht, (3) = Z_D50wht})) = (Matrix(3, 3, {(1, 1) = RX_D50, (1, 2) = GX_D50, (1, 3) = BX_D50, (2, 1) = RY_D50, (2, 2) = GY_D50, (2, 3) = BY_D50, (3, 1) = RZ_D50, (3, 2) = GZ_D50, (3, 3) = BZ_D50})).(Matrix(3, 3, {(1, 1) = Dr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Dg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Db})).Camera_Neutral

NULL

Functions

   

NULL

Input Data

   

NULL

Solve for Camera to XYZ D50 and T

   

NULL


Download Camera_to_XYZ_Tcorr.mw

 

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

How about this equation

restart:
solve(x^2 - 2*(m+1)*x+m^2 - 2*m + m^2=0,{x},parametric=full);
allvalues(%);?

Hi,

I was wondering how I could assign small angel assumptions so that I could simplify an equation of motion to solve for theta double dot. Thank you for your help.


Download small_angle_assumption.mw

Equation Manipulation

-assumptions- small angel

"sin(`ϑ`):=`ϑ`"

`ϑ`

(1)

"cos(`ϑ`):=1"

1

(2)

diff(`ϑ`(t), t) := 0

NULL

diff(x(t), t, t) := (H+u)/M


I*(diff(`ϑ`(t), t, t)) = [m*(-l*(diff(`ϑ`(t), t))^2*cos(`ϑ`)-l*(diff(`ϑ`(t), t, t))*sin(diff(`ϑ`(t), t)))-m*g]*l*sin(`ϑ`)+[m*(l*(diff(`ϑ`(t), t))^2*sin(`ϑ`)-l*(diff(`ϑ`(t), t, t))*cos(diff(`ϑ`(t), t))+diff(x(t), t, t))]*l*cos(`ϑ`)

"(->)"

Error, (in isolate) unable to isolate diff(diff(`ϑ`(t), t), t)

 

NULL

``


Download small_angle_assumption.mw

 

I want to solve system of equation but it has unknow parameter.

Then I test system of equation. It hasn't unknowparameter.

eq1 := x^2+y^2 = 4

eq2 := y-x^2 = 0

fsolve({eq1, eq2}, {x, y})

{x = -1.249621068, y = 1.561552813}

So I get answer by using fsolve.

 

Then I try to put unknow parameter in system of equation.

eq3 := x^2+ky^2 = 4

eq4 := ay-hx^2 = 0

fsolve({eq3, eq4}, {x, y})

Error, (in fsolve) {ay, hx, ky} are in the equation, and are not solved for

I don't get answer and open link. The link hasn't similar this problem.

Solve equation ...

September 15 2014 brian bovril 409

Why can't maple 15 solve this eqn. [n= 10]

solve(ithprime(n)=29,n);

 

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