|
|
|
last edited 13 years ago by test1 |
| 1 2 3 4 5 6 7 | ||
|
Editor: tester
Time: 2008/10/11 12:31:57 GMT-7 |
||
| Note: test | ||
added:
From tester Sat Oct 11 12:31:57 -0700 2008
From: tester
Date: Sat, 11 Oct 2008 12:31:57 -0700
Subject: test
Message-ID: <20081011123157-0700@axiom-wiki.newsynthesis.org>
\begin{axiom}
solve((-v^3 * cos(x) * sin(x)^2 / sqrt(v^2 * cos(x)^2 + 2*a*h) - v^2 * sin(x)^2 + v * cos(x) * sqrt(v^2 * cos(x)^2 + 2 * a * h) + v^2 * cos(x)^2) / a
\end{axiom}
What method is used to solve equation in Axiom?
(1) -> solve(sin(x)=4/5,x)
| (1) |
solve([a=4,sin(x)=a/5], [a, x])
| (2) |
In the following, a workaround is necessary because of bug #128:
)set output algebra on
)set output tex off
solve([V_q*U_q+V_l*U_l+V_d*U_d+V_a*U_a=U_ma,_ V_q*rho_q+V_l*rho_l+ V_d*rho_d+V_a*rho_a=rho_ma, i _ V_q*t_q+V_l*t_l+V_d*t_d+V_a*t_a=t_ma, _ V_q+V_l+V_d+V_a=1], _ [V_q, V_l, V_d, V_a] )
There are no library operations named i Use HyperDoc Browse or issue )what op i to learn if there is any operation containing " i " in its name.
Cannot find a definition or applicable library operation named i with argument type(s) Variable(V_q)
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
solve(v^4+b*v^3+c*v^2+d=0,v)
4 3 2 (3) [v + b v + c v + d = 0]
This didn't work since solve returns solutions expressible as members of the
ground field only. Above, the ground field of
defaults to
Fraction Polynomial Integer...
Thus, the proper call is
solve((v^4+b*v^3+c*v^2+d)::EXPR INT=0,v)
(4) [v = %v0,v = %v1,
v = +-----------------------------------------------------------+ | 2 2 2 \|- 3 %v1 + (- 2 %v0 - 2 b)%v1 - 3 %v0 - 2 b %v0 - 4 c + b - %v1 + - %v0 - b / 2 ,
v = +-----------------------------------------------------------+ | 2 2 2 - \|- 3 %v1 + (- 2 %v0 - 2 b)%v1 - 3 %v0 - 2 b %v0 - 4 c + b + - %v1 - %v0 - b / 2 ]
But really, you should use 'zerosOf':
zerosOf(v^4+b*v^3+c*v^2+d,v)
(5) [%v0,%v1,
+-----------------------------------------------------------+ | 2 2 2 \|- 3 %v1 + (- 2 %v0 - 2 b)%v1 - 3 %v0 - 2 b %v0 - 4 c + b - %v1 + - %v0 - b / 2 ,
+-----------------------------------------------------------+ | 2 2 2 - \|- 3 %v1 + (- 2 %v0 - 2 b)%v1 - 3 %v0 - 2 b %v0 - 4 c + b - %v1 + - %v0 - b / 2 ]
In the following, we have to do three things:
Fraction Polynomial Float to a list of
Fraction Polynomial Integer, since solve can only handle the latter, Furthermore, it's %pi, not %PI. Finally, the underscore is the escape
character (like \) and is also used as the the line continuation character
when it occurs at the end of th line. So K_sc is equivalent to just Ksc,
but K__sc is actually K_sc.
Here is one way to use macros and _ to define more complex names that print nicely in LaTeX? form:
K_sc ==> K___{sc_}
mu_sc ==> _\mu___{sc_}
digits(7);
l:= [0.01*(2.25-K_sc)*K_sc/(0.01*%pi*mu_sc*(mu_sc+3.0*K_sc)/ _
(4.0*mu_sc+3.0*K_sc)+2.25)+0.7*(37.0-K_sc)*(4.0*mu_sc/3.0+K_sc)/ _
(4.0*mu_sc/3.0+37.0)+0.29*(2.25-K_sc)*(4.0*mu_sc/3.0+K_sc)/ _
(4.0*mu_sc/3.0+2.25), _
-0.002*mu_sc*(2.0*(2.0*mu_sc/3.0+2.25)/ _
(0.01*%pi*mu_sc*(mu_sc+3.0*K_sc)/ _
(4.0*mu_sc+3.0*K_sc)+2.25)+800.0*mu_sc/ _
(%pi*(2.0*mu_sc*(mu_sc+3.0*K_sc)/ _
(4.0*mu_sc+3.0*K_sc)+mu_sc))+1.0)+0.7*(44.0-mu_sc)*(mu_sc*(8.0*mu_sc+9.0*K_sc)/ _
(6.0*(2.0*mu_sc+K_sc))+mu_sc)/ _
(mu_sc*(8.0*mu_sc+9.0*K_sc)/ _
(6.0*(2.0*mu_sc+K_sc))+44.0)-1.74*(2.0*mu_sc+K_sc)*(mu_sc*(8.0*mu_sc+9.0*K_sc)/ _
(6.0*(2.0*mu_sc+K_sc))+mu_sc)/(8.0*mu_sc+9.0*K_sc)]
(9)
[
4
(- 0.99 K_{sc} + 26.5525)\mu_{sc}
+
2 3
(- 4.98574 K_{sc} - 190.4062 K_{sc} + 7668.544)\mu_{sc}
+
3 2
(- 3.18243 K_{sc} - 435.6183 K_{sc} + 9082.386 K_{sc} + 17708.16)
*
2
\mu_{sc}
+
3 2
(- 208.4084 K_{sc} + 455.729 K_{sc} + 26696.39 K_{sc})\mu_{sc}
+
3 2
- 1531.879 K_{sc} + 10061.45 K_{sc}
/
4 3
\mu_{sc} + (3.0 K_{sc} + 315.9164)\mu_{sc}
+
2
(303.1717 K_{sc} + 8480.051)\mu_{sc}
+
(6465.401 K_{sc} + 13415.27)\mu_{sc} + 10061.45 K_{sc}
,
7 6
- 3.156061 \mu_{sc} + (- 19.3567 K_{sc} - 823.8225)\mu_{sc}
+
2 5
(- 40.72939 K_{sc} - 3289.616 K_{sc} + 1817.7)\mu_{sc}
+
3 2 4
(- 35.46834 K_{sc} - 4668.297 K_{sc} + 22513.6 K_{sc})\mu_{sc}
+
4 3 2 3
(- 10.85896 K_{sc} - 2766.375 K_{sc} + 53897.04 K_{sc} )\mu_{sc}
+
4 3 2
(- 575.9874 K_{sc} + 45929.19 K_{sc} )\mu_{sc}
+
4
13052.6 K_{sc} \mu_{sc}
/
6 5
\mu_{sc} + (6.75 K_{sc} + 352.4789)\mu_{sc}
+
2 4
(15.89063 K_{sc} + 1693.405 K_{sc} + 18907.61)\mu_{sc}
+
3 2 3
(15.82031 K_{sc} + 2951.913 K_{sc} + 73266.98 K_{sc})\mu_{sc}
+
4 3 2 2
(5.695313 K_{sc} + 2190.631 K_{sc} + 101037.5 K_{sc} )\mu_{sc}
+
4 3 4
(574.9593 K_{sc} + 58495.41 K_{sc} )\mu_{sc} + 11964.97 K_{sc}
]
-- solve exactly for fractions a:=solve (l::LIST FRAC POLY FRAC INT::LIST FRAC POLY INT);
-- Number of results: #a
(11) 2
-- But only the first one is of interest. -- Display it as a floating point result a.1::List Equation Fraction POLY FLOAT
(12) [\mu_{sc} = 0.0,K_{sc} = 6.568047]
-- Now check it map(x+->subst(x,(a.1)::List Equation FRAC POLY FLOAT), l)
(13) [0.0,0.0]
)clear all
All user variables and function definitions have been cleared.
solve((x=-1+x^2)::EQ EXPR INT,x)
+-+ +-+ \|5 + 1 - \|5 + 1 (1) [x = --------,x = ----------] 2 2
quadratic equation
solve(a*x^2+b*x+c=0,x)
2 (2) [a x + b x + c = 0]
solve(a*x+b=0,x)
b (3) [x = - -] a
quadratic equation
solve(x**2+x-1,x)
There are no library operations named ** Use HyperDoc Browse or issue )what op ** to learn if there is any operation containing " ** " in its name.
Cannot find a definition or applicable library operation named ** with argument type(s) Variable(x) PositiveInteger
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
radicalSolve(a*x**2+b*x+c=0,This doesn't work on mine michen:x)
There are no library operations named ** Use HyperDoc Browse or issue )what op ** to learn if there is any operation containing " ** " in its name.
Cannot find a definition or applicable library operation named ** with argument type(s) Variable(x) PositiveInteger
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
L := [ A = 2*P1+P2,B = 2*P2+P1, C = 2*Q1+Q2, D = 2*Q2+Q1]
(4) [A = P2 + 2 P1,B = 2 P2 + P1, C = Q2 + 2 Q1, D = 2 Q2 + Q1]
solve(L,[P1, P2])
(5) []
But it should, observe this:
solve([L.1,L.2], [P1, P2])
- B + 2 A 2 B - A (6) [[P1 = ---------,P2 = -------]] 3 3
solve([L.3,L.4], [Q1, Q2])
- D + 2 C 2 D - C (7) [[Q1 = ---------,Q2 = -------]] 3 3
First two equationa do not depend on
, the later two don't depend on
.
)set output algebra on
)set output tex off
radicalSolve(a*x**3+b*x**2+c*x+d=0,x)
There are no library operations named ** Use HyperDoc Browse or issue )what op ** to learn if there is any operation containing " ** " in its name.
Cannot find a definition or applicable library operation named ** with argument type(s) Variable(x) PositiveInteger
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
solve(sin(x)=4/5,x)
4 (8) [x = asin(-)] 5
solve(x^2=y,x)
2 (9) [y - x = 0]
solve(x3=x0+(x1-x0)*t + (x2-x0) *u,u)
x3 - t x1 + (t - 1)x0 (10) [u = ---------------------] x2 - x0
solve([x+y=3,x-y=1], [x, y])
(11) [[x = 2,y = 1]]
)set output tex off
)set output algebra on
A:=i=(a*x+c*z+e)/(z+g)
c z + a x + e (12) i = ------------- z + g
B:=j=(b*x+d*z+f)/(z+g)
d z + b x + f (13) j = ------------- z + g
solve([A,B], [x, z])
(14) (c g - e)j + (- d g + f)i - c f + d e - a g j + b g i + a f - b e [[x = -------------------------------------,z = ---------------------------] a j - b i - a d + b c a j - b i - a d + b c ]
)set output tex on
)set output algebra off
solve(sin(x)=4/5,x)
| (3) |
L := [ A = 2*P1+P2,B = 2*P2+P1, C = 2*Q1+Q2, D = 2*Q2+Q1]
There are 3 exposed and 0 unexposed library operations named equation having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse,or issue )display op equation to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named equation with argument type(s) Equation(Fraction(Polynomial(Integer))) Polynomial(Integer)
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
solve(14=x*1.1^x,x)
There are 20 exposed and 3 unexposed library operations named solve having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse,or issue )display op solve to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named solve with argument type(s) Equation(Expression(Float)) Variable(x)
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
)set output algebra on
)set output tex off
zerosOf((1-a)*x^4+x^3+x^2+x+1,x)
(16) [%x10,%x11,
- ROOT 2 2 (- 3 a + 6 a - 3)%x11 + 2 ((- 2 a + 4 a - 2)%x10 + 2 a - 2)%x11 + 2 2 (- 3 a + 6 a - 3)%x10 + (2 a - 2)%x10 + 4 a - 3 + (- a + 1)%x11 + (- a + 1)%x10 + 1 / 2 a - 2 ,
ROOT 2 2 2 (- 3 a + 6 a - 3)%x11 + ((- 2 a + 4 a - 2)%x10 + 2 a - 2)%x11 + 2 2 (- 3 a + 6 a - 3)%x10 + (2 a - 2)%x10 + 4 a - 3 + (- a + 1)%x11 + (- a + 1)%x10 + 1 / 2 a - 2 ]
)set output algebra off
)set output tex on
solve( dx_p = ( m / b ) * ( c0 - b * dv_p + c0 * log(c0) - _
c0 * log( c0 - b * dv_p ) + v0 * log(c0) - _
v0 * log( c0 - b * dv_p ) - ( c0 / b ) ), dv_p )
| (4) |
solve(((1+sqrt(5))^n-(1-sqrt(5))^n)/(sqrt(5)*2^n)=10^1001,n)
| (5) |
)set output tex off
)set output algebra on
solve([nnH+2*niH+nnCs+2*niCs = n,(niH+niCs)*niH/nnH = SH, (niH+niCs)*niCs/nnCs = SCs, (niH+nnH)/(niCs+nnCs) = alpha], [nnH, niH, nnCs, niCs])
(19) [ [ nnH = 2 2 ((- 2 SH + 2 SCs)alpha + (- 3 SH + 3 SCs)alpha - SH + SCs)niCs + 2 (- 2 SH alpha + (- SH - SCs)alpha)n + 2 2 2 (- 4 SCs SH + 2 SCs )alpha + (- 6 SCs SH + 4 SCs )alpha + 2 - 2 SCs SH + 2 SCs * niCs + 2 2 2 SCs alpha n + ((2 SCs SH - SCs )alpha + SCs SH - SCs )n / 2 2 (SCs alpha + SCs)n + SCs alpha + SCs ,
niH = 2 ((SH - SCs)alpha + SH - SCs)niCs + 2 2 (SH alpha n + (2 SCs SH - SCs )alpha + 2 SCs SH - 2 SCs )niCs + 2 (- SCs SH + SCs )n / 2 SCs n + SCs ,
nnCs = 2 ((- SH + SCs)alpha - SH + SCs)niCs + (((- SH - SCs)alpha - 2 SCs)n - 2 SCs SH alpha - 2 SCs SH)niCs + 2 SCs n + SCs SH n / 2 2 (SCs alpha + SCs)n + SCs alpha + SCs ,
2 3 ((SH - SCs)alpha + (2 SH - 2 SCs)alpha + SH - SCs)niCs + 2 2 2 (SH alpha + (SH + SCs)alpha + SCs)n + (2 SCs SH - SCs )alpha + 2 2 (5 SCs SH - 3 SCs )alpha + 3 SCs SH - 2 SCs * 2 niCs + 2 2 2 2 ((2 SCs alpha - SCs SH + 3 SCs )n + 2 SCs SH alpha + 2 SCs SH)niCs + 2 2 2 - SCs n - SCs SH n = 0 ] ]
solve((-v^3 * cos(x) * sin(x)^2 / sqrt(v^2 * cos(x)^2 + 2*a*h) - v^2 * sin(x)^2 + v * cos(x) * sqrt(v^2 * cos(x)^2 + 2 * a * h) + v^2 * cos(x)^2) / a
Line 1: solve((-v^3 * cos(x) * sin(x)^2 / sqrt(v^2 * cos(x)^2 + 2*a*h) - v^2 * sin(x)^2 + v * cos(x) * sqrt(v^2 * cos(x)^2 + 2 * a * h) + v^2 * cos(x)^2) / a .....A..............................................................................................................................................B Error A: Missing mate. Error B: syntax error at top level Error B: Possibly missing a ) 3 error(s) parsing