I've the following equations:
\[\sin \left( \theta \right) = a{x^{^2}} + bx + c\]
and
\[y = \int_0^x {\tan } \left( \theta \right)dx\]
I want to obtain the expression of y as the function of x. How should
I write the code with appropriate tools?
Thanks in advance.
--
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
The second equation above is wrong.
You can't have the limit of integration be x, and you are integrating with
respect to x as well.
(It will also help if you post you equation not in latex form, some might
have hard time reading it if they are not familiar with latex)
--Nasser
>> Hi all,
>>
>> I've the following equations:
>>
>> \[\sin \left( \theta \right) = a{x^{^2}} + bx + c\]
>>
>> and
>>
>> \[y = \int_0^x {\tan } \left( \theta \right)dx\]
>>
>> I want to obtain the expression of y as the function of x. How should
>> I write the code with appropriate tools?
>>
>> Thanks in advance.
>>
>> --
>> .: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
>
>The second equation above is wrong.
>
>You can't have the limit of integration be x, and you are integrating with
>respect to x as well.
>
>(It will also help if you post you equation not in latex form, some might
>have hard time reading it if they are not familiar with latex)
Sorry for my LaTeX form of this issue, now, I give it in the following
ones:
theta=arcsin(a*x^2+b*x+c)
and
y=integrate(tan(theta),x,0,x').
Best regards,
You can sort of do this with the Symbolic Math Toolbox.
syms a b c x t
mtheta = asin(a*x^2 + b*x + c);
y = int(tan(mtheta),0,t)
The result is only partially satisfactory:
Warning: Explicit integral could not be found.
y =
int((a*x^2 + b*x + c)/(1 - (a*x^2 + b*x + c)^2)^(1/2), x = 0..t)
MATLAB simplified the tan(arcsin) expression, but then did not integrate
what remained.
Alan Weiss
MATLAB mathematical toolbox documentation
as long as a*x^2+b*x+c<1 the result of
int(tan(arcsin(a*x^2+b*x+c)))dx is
-I Sqrt[b^2-4a(1+c)]/(4a)*
EllipticE[ArcSin[(b+2a x)/Sqrt[b^2+4a(1-c)]], (b^2+4a(1-c))/(b^2-4a(1+c))] -
I Sqrt[b^2+4a(1-c)]/(4a)*
EllipticE[ArcSin[(b+2a x)/Sqrt[b^2-4a(1+c)]], (b^2-4a(1+c))/(b^2+4a(1-c))],
a rather complicated expression containing EllipticE.
Regards Andreas
In Maple, I did
theta := arcsin(a*x^2+b*x+c);
int(tan(theta),x);
and the result was about 12K long, but did involve EllipticE and
EllipticF
This integral is quadratic/sqrt(quartic), so of course it is an
elliptic integral.
--
G. A. Edgar http://www.math.ohio-state.edu/~edgar/
>In Maple, I did
>theta := arcsin(a*x^2+b*x+c);
>int(tan(theta),x);
>and the result was about 12K long, but did involve EllipticE and
>EllipticF
>
>This integral is quadratic/sqrt(quartic), so of course it is an
>elliptic integral.
Oh, my god:-)
>> theta=arcsin(a*x^2+b*x+c)
>>
>> and
>>
>> y=integrate(tan(theta),x,0,x').
>>
>
> You can sort of do this with the Symbolic Math Toolbox.
>
> syms a b c x t
> mtheta = asin(a*x^2 + b*x + c);
> y = int(tan(mtheta),0,t)
>
> The result is only partially satisfactory:
>
> Warning: Explicit integral could not be found.
>
> y =
>
> int((a*x^2 + b*x + c)/(1 - (a*x^2 + b*x + c)^2)^(1/2), x = 0..t)
>
> MATLAB simplified the tan(arcsin) expression, but then did not integrate
> what remained.
>
> Alan Weiss
> MATLAB mathematical toolbox documentation
I tired this in Mathematica 7.0, under the assumptions that (a,b,c) are
real, and the upper limit of integration (which I called z) is also real.
theta = ArcSin[a*x^2 + b*x + c]
Assuming[Element[{a, b, c, z}, Reals], Integrate[Tan[theta], {x, 0, z}]]
If[(NotElement[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
(Element[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] &&
(Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] <= -2 ||
Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0))) &&
(NotElement[(b + Sqrt[4*a + b^2 - 4*a*c])/(a*z), Reals] ||
Re[(b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] <= -2 ||
Re[(b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 0) &&
(NotElement[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] <= -2 ||
Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0) &&
(NotElement[(-b + Sqrt[b^2 - 4*a*(-1 + c)])/(a*z), Reals] ||
Re[(-b + Sqrt[b^2 - 4*a*(-1 + c)])/(a*z)] == 0 ||
Re[(-b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 2 ||
Re[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 0) &&
(NotElement[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
Re[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] == 0 ||
Re[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 2 ||
Re[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0) &&
(NotElement[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z), Reals] ||
NotElement[(-b + Sqrt[4*a + b^2 - 4*a*c])/(a*z), Reals] ||
Re[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z)] <= -2 ||
Re[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 0 ||
Re[(-b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] == 0) &&
(NotElement[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
NotElement[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
Re[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] <= -2 ||
Re[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0 ||
Re[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] == 0) &&
(NotElement[-(b/(2*a*z)) - Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z), Reals] ||
Re[-(b/(2*a*z)) - Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] == 0 ||
Re[-(b/(2*a*z)) - Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] <= 0 ||
NotElement[b/(2*a*z) + Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z), Reals] ||
Re[b/(2*a*z) + Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] == -1 ||
Re[b/(2*a*z) + Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] <= -1),
-((c*(-b + Sqrt[-4*a + b^2 - 4*a*c])^2*Sqrt[((-b - Sqrt[4*a + b^2 -
4*a*c])*
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[-4*a + b^2 -
4*a*c])/
(2*a)))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b - Sqrt[4*a + b^2 -
4*a*c])/
(2*a)))]*((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a) - (-b + Sqrt[4*a
+ b^2 - 4*a*c])/
(2*a))*Sqrt[((-b + Sqrt[4*a + b^2 - 4*a*c])*
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[-4*a + b^2 -
4*a*c])/
(2*a)))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/
(2*a)))]*Sqrt[((-b - Sqrt[-4*a + b^2 - 4*a*c])*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a)))/
((-b + Sqrt[-4*a + b^2 - 4*a*c])*(-((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))]*
EllipticF[ArcSin[Sqrt[((-b - Sqrt[-4*a + b^2 - 4*a*c])*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a +
b^2 - 4*a*c])/
(2*a)))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a +
b^2 - 4*a*c])/
(2*a)))]], (((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a) -
(-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a))*((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))/(((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a))*((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))])/(2*a^2*Sqrt[1 - c^2]*
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a)))) +
(2*c*((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a) - (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
Sqrt[((-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a +
b^2 - 4*a*c])/
(2*a))*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))/
((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))]*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z)^2*
Sqrt[((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[-4*a +
b^2 - 4*a*c])/
(2*a))*(-((-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a)) + z))/
((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b - Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))]*
Sqrt[((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[-4*a +
b^2 - 4*a*c])/
(2*a))*(-((-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)) + z))/
((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))]*
EllipticF[ArcSin[Sqrt[((-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))*(-((-b - Sqrt[-4*a + b^2 -
4*a*c])/
(2*a)) + z))/((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))*(-((-b + Sqrt[-4*a + b^2 -
4*a*c])/
(2*a)) + z))]], (((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a) -
(-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a))*((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))/(((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a))*((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))])/
((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
Sqrt[1 - (c + z*(b + a*z))^2]) - (b*(-b + Sqrt[-4*a + b^2 - 4*a*c])^2*
Sqrt[((b + Sqrt[-4*a + b^2 - 4*a*c])*(Sqrt[-4*a + b^2 - 4*a*c] -
Sqrt[4*a + b^2 - 4*a*c]))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c]))]*
Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-b - Sqrt[4*a + b^2 - 4*a*c]))/
(a*(-b + Sqrt[-4*a + b^2 - 4*a*c])*(-((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) +
(-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a)))]*((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))*
Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-b + Sqrt[4*a + b^2 - 4*a*c]))/
(a*(-b + Sqrt[-4*a + b^2 - 4*a*c])*(-((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))]*
(-((1/(2*a))*((-b + Sqrt[-4*a + b^2 - 4*a*c])*EllipticF[
ArcSin[Sqrt[((b + Sqrt[-4*a + b^2 - 4*a*c])*(Sqrt[-4*a + b^2 -
4*a*c] - Sqrt[
4*a + b^2 - 4*a*c]))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c]))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])) +
(1/a)*(Sqrt[-4*a + b^2 - 4*a*c]*EllipticPi[
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))/
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/
(2*a)), ArcSin[Sqrt[((b + Sqrt[-4*a + b^2 - 4*a*c])*(Sqrt[-4*a +
b^2 - 4*a*c] -
Sqrt[4*a + b^2 - 4*a*c]))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c]))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])))/
(2*a^2*Sqrt[1 - c^2]*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) +
(-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a))*((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))) - (1/Sqrt[1 - c^2])*
(a*(-(((-b - Sqrt[-4*a + b^2 - 4*a*c])*(-b - Sqrt[4*a + b^2 - 4*a*c])*
(-b + Sqrt[4*a + b^2 - 4*a*c]))/(8*a^3)) +
(1/(4*a^2))*((-b + Sqrt[-4*a + b^2 - 4*a*c])^2*
Sqrt[((b + Sqrt[-4*a + b^2 - 4*a*c])*(Sqrt[-4*a + b^2 - 4*a*c] -
Sqrt[4*a + b^2 - 4*a*c]))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c]))]*
Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-b - Sqrt[4*a + b^2 - 4*a*c]))/
(a*(-b + Sqrt[-4*a + b^2 - 4*a*c])*(-((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) +
(-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a)))]*
Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-b + Sqrt[4*a + b^2 - 4*a*c]))/
(a*(-b + Sqrt[-4*a + b^2 - 4*a*c])*(-((-b - Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))]*
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
((a*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b - Sqrt[4*a +
b^2 - 4*a*c])/
(2*a))*EllipticE[ArcSin[Sqrt[((b + Sqrt[-4*a + b^2 - 4*a*c])*
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c]))/(
(-b + Sqrt[-4*a + b^2 - 4*a*c])*(Sqrt[-4*a + b^2 - 4*a*c] +
Sqrt[4*a + b^2 - 4*a*c]))]], (Sqrt[-4*a + b^2 - 4*a*c] +
Sqrt[
4*a + b^2 - 4*a*c])^2/(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a +
b^2 - 4*a*c])^
2])/Sqrt[-4*a + b^2 - 4*a*c] +
(a*(((-b + Sqrt[-4*a + b^2 - 4*a*c])*(-((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))/(2*a) -
((-b - Sqrt[-4*a + b^2 - 4*a*c])*((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))/(2*a))*
EllipticF[ArcSin[Sqrt[((b + Sqrt[-4*a + b^2 - 4*a*c])*(Sqrt[-4*a
+ b^2 -
4*a*c] - Sqrt[4*a + b^2 - 4*a*c]))/((-b + Sqrt[-4*a +
b^2 - 4*a*c])*
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c]))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])/
(Sqrt[-4*a + b^2 - 4*a*c]*(-((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))) -
((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) - (-b + Sqrt[-4*a +
b^2 - 4*a*c])/
(2*a) - (-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a) - (-b + Sqrt[4*a +
b^2 - 4*a*c])/
(2*a))*EllipticPi[(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))/(-((-b + Sqrt[-4*a +
b^2 - 4*a*c])/
(2*a)) + (-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)),
ArcSin[Sqrt[((b + Sqrt[-4*a + b^2 - 4*a*c])*(Sqrt[-4*a + b^2 -
4*a*c] -
Sqrt[4*a + b^2 - 4*a*c]))/((-b + Sqrt[-4*a + b^2 - 4*a*c])*
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c]))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])/
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/
(2*a)))))) + (2*b*((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))*(-((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) + z)^
2*Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-((-b - Sqrt[4*a + b^2 -
4*a*c])/(2*a)) + z))/
(a*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b - Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))]*
Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-((-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))
+ z))/
(a*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))]*
Sqrt[((Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])*
(b + Sqrt[-4*a + b^2 - 4*a*c] + 2*a*z))/((Sqrt[-4*a + b^2 - 4*a*c] +
Sqrt[4*a + b^2 - 4*a*c])*(-b + Sqrt[-4*a + b^2 - 4*a*c] - 2*a*z))]*
(-((1/(2*a))*((-b + Sqrt[-4*a + b^2 - 4*a*c])*EllipticF[
ArcSin[Sqrt[((Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])*
(b + Sqrt[-4*a + b^2 - 4*a*c] + 2*a*z))/((Sqrt[-4*a + b^2 -
4*a*c] + Sqrt[
4*a + b^2 - 4*a*c])*(-b + Sqrt[-4*a + b^2 - 4*a*c] -
2*a*z))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])) +
(1/a)*(Sqrt[-4*a + b^2 - 4*a*c]*EllipticPi[
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))/
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/
(2*a)), ArcSin[Sqrt[((Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a +
b^2 - 4*a*c])*
(b + Sqrt[-4*a + b^2 - 4*a*c] + 2*a*z))/((Sqrt[-4*a + b^2 -
4*a*c] +
Sqrt[4*a + b^2 - 4*a*c])*(-b + Sqrt[-4*a + b^2 - 4*a*c] -
2*a*z))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])))/
((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a))*
((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a) - (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
Sqrt[1 - (c + z*(b + a*z))^2]) +
(a*((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z)*
(-((-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a)) + z)*
(-((-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)) + z) +
(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a))*
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z)^2*
Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-((-b - Sqrt[4*a + b^2 -
4*a*c])/(2*a)) + z))/
(a*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b - Sqrt[4*a +
b^2 - 4*a*c])/
(2*a))*(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))]*
Sqrt[(Sqrt[-4*a + b^2 - 4*a*c]*(-((-b + Sqrt[4*a + b^2 -
4*a*c])/(2*a)) + z))/
(a*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a +
b^2 - 4*a*c])/
(2*a))*(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + z))]*
Sqrt[((Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])*
(b + Sqrt[-4*a + b^2 - 4*a*c] + 2*a*z))/((Sqrt[-4*a + b^2 - 4*a*c]
+
Sqrt[4*a + b^2 - 4*a*c])*(-b + Sqrt[-4*a + b^2 - 4*a*c] -
2*a*z))]*
((a*(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b - Sqrt[4*a +
b^2 - 4*a*c])/
(2*a))*EllipticE[ArcSin[Sqrt[((Sqrt[-4*a + b^2 - 4*a*c] -
Sqrt[4*a + b^2 -
4*a*c])*(b + Sqrt[-4*a + b^2 - 4*a*c] + 2*a*z))/
((Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])*(-b +
Sqrt[-4*a + b^2 - 4*a*c] - 2*a*z))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])/
Sqrt[-4*a + b^2 - 4*a*c] +
(a*(((-b + Sqrt[-4*a + b^2 - 4*a*c])*(-((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a)) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))/(2*a) -
((-b - Sqrt[-4*a + b^2 - 4*a*c])*((-b + Sqrt[-4*a + b^2 -
4*a*c])/(2*a) -
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)))/(2*a))*
EllipticF[ArcSin[Sqrt[((Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a +
b^2 - 4*a*c])*(b +
Sqrt[-4*a + b^2 - 4*a*c] + 2*a*z))/((Sqrt[-4*a + b^2 -
4*a*c] +
Sqrt[4*a + b^2 - 4*a*c])*(-b + Sqrt[-4*a + b^2 - 4*a*c] -
2*a*z))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])/
(Sqrt[-4*a + b^2 - 4*a*c]*(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a))
+
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))) -
((-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) - (-b + Sqrt[-4*a + b^2 -
4*a*c])/
(2*a) - (-b - Sqrt[4*a + b^2 - 4*a*c])/(2*a) - (-b + Sqrt[4*a +
b^2 - 4*a*c])/
(2*a))*EllipticPi[(-((-b - Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) +
(-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a))/(-((-b + Sqrt[-4*a +
b^2 - 4*a*c])/(2*
a)) + (-b + Sqrt[4*a + b^2 - 4*a*c])/(2*a)),
ArcSin[Sqrt[((Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 -
4*a*c])*(b +
Sqrt[-4*a + b^2 - 4*a*c] + 2*a*z))/((Sqrt[-4*a + b^2 -
4*a*c] +
Sqrt[4*a + b^2 - 4*a*c])*(-b + Sqrt[-4*a + b^2 - 4*a*c] -
2*a*z))]],
(Sqrt[-4*a + b^2 - 4*a*c] + Sqrt[4*a + b^2 - 4*a*c])^2/
(Sqrt[-4*a + b^2 - 4*a*c] - Sqrt[4*a + b^2 - 4*a*c])^2])/
(-((-b + Sqrt[-4*a + b^2 - 4*a*c])/(2*a)) + (-b + Sqrt[4*a + b^2 -
4*a*c])/
(2*a)))))/Sqrt[1 - (c + z*(b + a*z))^2],
Integrate[(c + x*(b + a*x))/Sqrt[1 - (c + x*(b + a*x))^2], {x, 0, z},
Assumptions -> Element[a | b | c | z, Reals] &&
!((NotElement[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
(Element[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] &&
(Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] <= -2 ||
Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0))) &&
(NotElement[(b + Sqrt[4*a + b^2 - 4*a*c])/(a*z), Reals] ||
Re[(b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] <= -2 ||
Re[(b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 0) &&
(NotElement[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] <= -2 ||
Re[(b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0) &&
(NotElement[(-b + Sqrt[b^2 - 4*a*(-1 + c)])/(a*z), Reals] ||
Re[(-b + Sqrt[b^2 - 4*a*(-1 + c)])/(a*z)] == 0 ||
Re[(-b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 2 ||
Re[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 0) &&
(NotElement[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
Re[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] == 0 ||
Re[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 2 ||
Re[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0) &&
(NotElement[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z), Reals] ||
NotElement[(-b + Sqrt[4*a + b^2 - 4*a*c])/(a*z), Reals] ||
Re[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z)] <= -2 ||
Re[(b - Sqrt[4*a + b^2 - 4*a*c])/(a*z)] >= 0 ||
Re[(-b + Sqrt[4*a + b^2 - 4*a*c])/(a*z)] == 0) &&
(NotElement[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
NotElement[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z), Reals] ||
Re[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] <= -2 ||
Re[(b - Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] >= 0 ||
Re[(-b + Sqrt[b^2 - 4*a*(1 + c)])/(a*z)] == 0) &&
(NotElement[-(b/(2*a*z)) - Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z), Reals]
||
Re[-(b/(2*a*z)) - Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] == 0 ||
Re[-(b/(2*a*z)) - Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] <= 0 ||
NotElement[b/(2*a*z) + Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z), Reals] ||
Re[b/(2*a*z) + Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] == -1 ||
Re[b/(2*a*z) + Sqrt[-4*a + b^2 - 4*a*c]/(2*a*z)] <= -1))]]
--Nasser
Though I do not trust Maple on elliptics one can try to use simplify with
siderelations (after starring at the integral):
tan(theta);
factor(%);
simplify(%, {a*x^2+b*x+c=xi});
xi
------------
2 1/2
(1 - xi )
and then try changing variables
a*x^2+b*x+c=xi; isolate(%, x);
eq:=simplify(%, size);
tan(theta);
factor(%);
Int(%, x);
Change(%, eq, xi);
simplify(%):
value(%):
simplify(%, symbolic); # depends on the parameters
simplify(%, size);
length(%);
501
which gives an expression in terms in Elliptics with 500 characters (and
about 700 without symbolic [i.e. not ignoring conditions] simplification)
and may be shortend a bit by hand.
The above change xi <---> x needs to consider the two sides of parabola.
This is a beauty, isn't it - and it doesn't contain the imaginary unit
anymore! But I suspect a less impressive expression also not involving
"ImaginaryI" can be obtained by a suitable transformation of Andreas'
result.
Martin.
here you have an expression for the integral without imaginary unit :
1/Sqrt[2a]*(2EllipticE[ArcSin[Sqrt[2] (b+2a*x)/(Sqrt[4a(1-c)+b^2 ]Sqrt[1+c+b*x+a*x^2])], (4a+b^2-4a*c)/(8a)] - EllipticF[ArcSin[Sqrt[2] (b+2a*x)/(Sqrt[4a(1-c)+b^2]Sqrt[1+c+b*x+a*x^2])], (4a+b^2-4a*c)/(8a)]) -
(b+2a*x)Sqrt[1-c-b*x-a*x^2]/(2a*Sqrt[1+c+b*x+a*x^2])
Andreas
> I've the following equations:
>
> [sin left( theta right) = a{x^{^2}} + bx + c]
>
> and
>
> [y = int_0^x {tan } left( theta right)dx]
>
Huh? Do you mean
sin t = ax^2 + bx + c
y = integral(0,x) tan t dx?
Then y = x.tan t; y = x.tan arcsin(ax^2 + bx + c) (See note below.)
Note that the first equation requires
-1 <= ax^2 + bx + c <= 1.
Or do you mean integral(0,x) tan t dt?
Then y = -log cos x + log cos 0 = -log cos x.
Or do you mean
y = integral(0,x) tan arcsin(ax^2 + bx + c) dx?
Note that
tan arcsin r = r/sqr(1 - r^2).
Thus
y = integral(0,x) r/sqr(1 - r^2) dx
where
r = ax^2 + bx + c.
> I want to obtain the expression of y as the function of x.
Done for all three cases except for not doing the integration
for the third case.
Somebody else complained that you have x in a limit and x in dx.
That is no problem. integral(0,x) t dt = x^2 / 2 = integral(0,x) x dx.
> How should I write the code with appropriate tools?
The appropriate tool isn't computers, it's math.
Why do you insist computers can solve everything?
Thank you for using sufficient spaces in your mathematical
expressions to make them easy to read and prevent eye strain.
Indeed, a = b + xy < c is usually read, a=b+xy<c often isn't.
Don'tcauseeyestrain.Usesufficentspaces for yourmathexpressions.
As the x in f(x) is bounded by dx, it can be replaced by any other
variable as long as there's no confusion of variables. Are you claiming
the variable x in integral (0,x) binds the variables in the ingrand?
Could one make the same claim of sum(j=0,n) j ?
sum(n=0,n) f(n,m) would be confusing unto possible error.
Confusion could be somewhat abated by stating the sum f(n,m) on n.
Have you any problem with sum(n=0,m) f(n,m) ?
Likewise with integral from x = 0 to x = x.
However integral(0,x) x dx = 1/2 * x^2 |_0^x = 1/2 * x^2
has no confusion to the sharp minded.
Yet integral(0,x) f where
f = f:R -> R, t -> t = f:R -> R, x -> x
easily allows the change of variable from t to x.
So it's a matter of notation, not of concept.
Let y = x, then
integral(0,y) t dt = integral(0,y) x dx = integral(0,x) x dx.
Where is the mistake?
> The ingredients in an integral (rather than an
> antiderivative) are a function and a subset of its domain. (If we are
> talking about the Riemann integral, the subset is to be a bounded
> interval.) If you wish to discuss an interval called "(0,x)" then I
> understand that to mean you are thinking about all intervals (within
> the domain of the function) whose left endpoint is 0, which is fine;
> the value of the integral will depend on x.
F(x) = integral(0,x) t dt = integral(0,x) x dx.
The domain of F can be R.
> Then you need to specify the function, let's call it f . In this
> example, f is the identity function. In the last format, you are
> choosing to write it as f(x)=x. I guess that's clear; but since the
> letter x has already been used to name the right-hand endpoint, this
> will become confusing. For example, if F(x) is this integral, is F(1)
> now the integral of the function defined on (0,1) whose value at every
> point is 1 ? Or is it the integral of a function which is only defined
> at 1?
The domain of integral(0,x) f would be considered the domain
of f provided domain f is an interval (convex subset of R).
When it's not, domain integral(0,x) f would be the
connected component of domain f which has 0 as a member.
These natural conventions can be overridden by an explicit definition
of the domain as long as it's a subset of domain f or rather, the
connected component of domain f with 0 as a member.
> (since "f(x)=x" now reads "f(1)=1"). THe confusion disappears if
> you agree to use some other letter as the name of the input variable for
> f, e.g. integral(0,x) t dt .
>
Indeed, when confusion of variables arise, then the binding variables can
be changed so confusion will not occur when the substitution is made.
> Saying "you know what I mean!" may be true but as a teacher I have
> seen many examples of students who forget what they themselves mean,
> and get into trouble this way...
>
That's not math. That's telepathy to
which I reply, I'm not a mind reader.
The respective views are that
integrate(f(x) dx x=0 to x) is confusing and should be written
integrate(f(t) dt t=0 to t) so that students and others are not confused.
and
integrate(f(x) dx x=0 to x) is a well-known if potentially confusing
notation, but really causes no problem (especially for computer programs?)
Both views are correct, in my opinion. And compatible.
It has nothing to do with domains, intervals, subsets. The calculus of
lambda conversion, specifically alpha conversion, allows you (or in
particular, a computer program) to freely interchange the name of the
symbol after the d as in dx, within the scope of the integral. Not
the endpoints. Thus integrate(f(x)dx from 0 to anything) can be
changed by alpha conversion to integrate(f(t) dt from 0 to anything)
whether or not "anything" contains x. Entirely mechanically and without
ambiguity, with one issue:
you cannot introduce a variable t that is already in f.
e.g. if f(x)= t*x, you cannot do alpha conversion into f(t)=t*t.
If this is not obvious, consider df/dt in the two cases.
I hope this does not engender more discussion.
RJF
The respective views are that
integrate(f(x) dx x=0 to x) is confusing and should be written
integrate(f(t) dt t=0 to x) so that students and others are not
confused.
^^^
and
integrate(f(x) dx x=0 to x) is a well-known if potentially confusing
notation, but really causes no problem (especially for computer
programs?)
RJF
>and
>RJF
It is hard to tell what the compiler will understand,
but one thing I tell my students is that one should
not use the same symbol for two things on the same
blackboard.
If I remember correctly, there is a comma after the
dx or dt, which most will read as the break between
bindings. Actually, the break is before the = sign,
and if read that way will work.
--
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
hru...@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558
> but one thing I tell my students is that one should
> not use the same symbol for two things on the same
> blackboard.
I agree, but in programming no one is very disturbed by
f(x):=x^2;
g(x):=x^3-3;
even though it might be less confusing to say
f(x1):=x1^2;
g(x2):=x2^3-3;
Many mathematicians use seriously ambiguous notations, generally not
deliberately, but as part of the context of their field.
This, in my experience learning some advanced math stuff without being
educated in the context, makes it very difficult to "automate" the
computations. Occasionally one encounters a very stylistically-conscious
presenter of mathematics in unambiguous formality, which can
simultaneously represent a relief (for implementation) or a disaster
(for getting a "gut feeling"). I remember when first learning about
wavelets, I was referred to an "excellent exposition" by a colleague. I
could not follow it, and learned about wavelets via some other papers.
I then went back to that original paper and found that it was, in some
sense, an excellent exposition. But only after you knew what it was saying.
Somewhat repetitiously...
in integration of functions, in sort-of-lisp notation, let
f := lambda(x)(cos x)
g := lambda(y) (+ y 1)
then there is no problem with
integrate(f,0,1) integrate(f,0,x) integrate(g,0,x) ....
and also no problem with
integrate ( lambda(x)(cos x) , 0, x)
because the final x is outside the lambda binding.
But if this is confusing, rewrite by alpha conversion, to, say,
integrate( lambda(t)(cos t) , 0, x)
But if you find alpha conversion confusing, there is no escape.
>> integrate(f(x) dx x=0 to x) is a well-known if potentially confusing
>> notation, but really causes no problem (especially for computer
>> programs?)
>
> It is hard to tell what the compiler will understand,
> but one thing I tell my students is that one should
> not use the same symbol for two things on the same
> blackboard.
>
Corollary.
Don't use the same name for files in different directories.
I guess you want:
a = b + x y < c
or
a = b + x*y < c
but not
a=b+x*y<c
?????
:-))
While this may have some particular meaning to some mathematician, I am
reading this on a computer, and in that context I assume it is supposed
to be understood as meaningful to computer systems. But it is quite
ambiguous.
As Peter says, there is a question as to whether x and y are multiplied,
or there is a name "xy". But that is not all.
Is this an assignment statement as in Mathematica:
assign to the name a
the value of b+x*y<c
which is perhaps true, false, unknown, (or maybe 0,1) if it is a
language that uses these for true/false. Or maybe just the unevaluated
"b+x*y<c"?
or is R=S<T the same as (R is equal to S) and (S is less than T)
or is it assign to the name a
the value of b+x*y
then test to see if that value is less than c?
And there are more possible interpretations.
It is also strange that Mr. Elliot likes space so much that he praises
\left( \right) instead of ().
Perhaps he would like to read html without the aid of a browser, if it
has lots of space.
Apologies for being so off-topic. (Look at the subject line).
I said on the SAME blackboard. I can see nothing wrong in
using exam1, exam2, exam3 in three different course directories.
Nothing as long you can keep them home.