有问题就有答案
mathematica画抛物线想用mathematica做两个抛物线方程的图,方程为y^2=
Plot[{Sqrt[-20*x],-Sqrt[-20*x]},{x,-5,1}]
Plot[-0.4x^2,{x,0,5}]
mathematica计算方程组:
用t表示θ,
方程为Solve[{a2 Cos[t1 + t2] + a1 Cos[t1] == x0, a2 Sin[t1 + t2] + a1 Sin[t1] == y0}, {t1, t2}]
解得:
{{t2 -> -ArcCos[(-a1^2 - a2^2 + x0^2 + y0^2)/(2 a1 a2)],
t1 -> -ArcCos[(a1^3 x0 - a1 a2^2 x0 + a1 x0^3 +
a1 x0 y0^2 - \[Sqrt](-a1^6 y0^2 + 2 a1^4 a2^2 y0^2 -
a1^2 a2^4 y0^2 + 2 a1^4 x0^2 y0^2 + 2 a1^2 a2^2 x0^2 y0^2 -
a1^2 x0^4 y0^2 + 2 a1^4 y0^4 + 2 a1^2 a2^2 y0^4 -
2 a1^2 x0^2 y0^4 - a1^2 y0^6))/(2 (a1^2 x0^2 +
a1^2 y0^2))]}, {t2 -> -ArcCos[(-a1^2 - a2^2 + x0^2 + y0^2)/(
2 a1 a2)],
t1 -> ArcCos[(a1^3 x0 - a1 a2^2 x0 + a1 x0^3 +
a1 x0 y0^2 - \[Sqrt](-a1^6 y0^2 + 2 a1^4 a2^2 y0^2 -
a1^2 a2^4 y0^2 + 2 a1^4 x0^2 y0^2 + 2 a1^2 a2^2 x0^2 y0^2 -
a1^2 x0^4 y0^2 + 2 a1^4 y0^4 + 2 a1^2 a2^2 y0^4 -
2 a1^2 x0^2 y0^4 - a1^2 y0^6))/(2 (a1^2 x0^2 +
a1^2 y0^2))]}, {t2 -> -ArcCos[(-a1^2 - a2^2 + x0^2 + y0^2)/(
2 a1 a2)],
t1 -> -ArcCos[(a1^3 x0 - a1 a2^2 x0 + a1 x0^3 +
a1 x0 y0^2 + \[Sqrt](-a1^6 y0^2 + 2 a1^4 a2^2 y0^2 -
a1^2 a2^4 y0^2 + 2 a1^4 x0^2 y0^2 + 2 a1^2 a2^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1^2 y0^6))/(2 (a1^2 x0^2 +
a1^2 y0^2))]}, {t2 ->
ArcCos[(-a1^2 - a2^2 + x0^2 + y0^2)/(2 a1 a2)],
t1 -> -ArcCos[(a1^3 x0 - a1 a2^2 x0 + a1 x0^3 +
a1 x0 y0^2 + \[Sqrt](-a1^6 y0^2 + 2 a1^4 a2^2 y0^2 -
a1^2 a2^4 y0^2 + 2 a1^4 x0^2 y0^2 + 2 a1^2 a2^2 x0^2 y0^2 -
a1^2 x0^4 y0^2 + 2 a1^4 y0^4 + 2 a1^2 a2^2 y0^4 -
2 a1^2 x0^2 y0^4 - a1^2 y0^6))/(2 (a1^2 x0^2 +
a1^2 y0^2))]}, {t2 ->
ArcCos[(-a1^2 - a2^2 + x0^2 + y0^2)/(2 a1 a2)],
t1 -> ArcCos[(a1^3 x0 - a1 a2^2 x0 + a1 x0^3 +
a1 x0 y0^2 + \[Sqrt](-a1^6 y0^2 + 2 a1^4 a2^2 y0^2 -
a1^2 a2^4 y0^2 + 2 a1^4 x0^2 y0^2 + 2 a1^2 a2^2 x0^2 y0^2 -
a1^2 x0^4 y0^2 + 2 a1^4 y0^4 + 2 a1^2 a2^2 y0^4 -
2 a1^2 x0^2 y0^4 - a1^2 y0^6))/(2 (a1^2 x0^2 +
a1^2 y0^2))]}}
怎么让Mathematica计算出来的弧度值转换成度数
除个 Degree 再取它的数值值就行了……例:
N[10/ Degree]
(*
572.958
*)
如果是化成度数时是个“整”值的场合也可以用FullSimplify:
FullSimplify[Pi/2/ Degree]
(*
90
*)
若a=(3,1,4,7,3,6) 怎么用Mathematica求a中元素的个数啊
Length[a]
Z'(x) = R + Z^2(x),K(x)=[
第一部,解微分方程 Z'(x) = R + Z^2(x)
DSolve[Z'[x] == R + Z[x]^2,Z[x],x]
得到函数Z等于 Sqrt[R] Tan[Sqrt[R] x + Sqrt[R] C[1]]
注意这里的C〔1〕表示任意常数.
第二步,定义函数 (c是任意常数)
Z[x_] = Sqrt[R] Tan[Sqrt[R] x + Sqrt[R] c];
k[x_] = (-B R + A Z[x])/(A + B Z[x]);
注意k和c要小写,大写字母已经被系统占用了.末尾的分号表示运行这两行的时候不显示输出,可以去掉.
第三步,求导并化简
FullSimplify[D[k[x],x]]
得到
(R (A^2 + B^2 R))/(A Cos[Sqrt[R] (c + x)] + B Sqrt[R] Sin[Sqrt[R] (c + x)])^2
转载请注明:mathematica如何下载,mathematica画抛物线想用mathematica做两个抛物线方程的图,方程为y^2= | 热豆腐网址之家