简体   繁体   English

使用 CX CAS 求解方程组时避免资源耗尽错误

[英]Circumventing resource exhaustion errors when solving systems of equations using CX CAS

I am attempting to solve the following system of 2 equations (2 unknowns) using a Ti-Nspire CX CAS calculator:我正在尝试使用 Ti-Nspire CX CAS 计算器求解以下 2 个方程组(2 个未知数):

I have already solved it using Mathematica:我已经使用 Mathematica 解决了它:

Solve[v*Sqrt[1+0.5^2 + 2*0.5*Cos[2*(2*Pi/(8*10^-3))*(-3*10^-3) + p]]==2 && v*Sqrt[1+0.5^2 + 2*0.5*Cos[2*(2*Pi/(8*10^-3))*(-1*10^-3) + p]]==6 && 0<=p<=2*Pi, {v,p}];

So I know that v=4 and p=Pi/2 but I get a "Resource exhaustion; Cannot complete calculation" error when I try to solve the system on the calculator with the following 3 steps:所以我知道 v=4 和 p=Pi/2 但是当我尝试使用以下 3 个步骤在计算器上解决系统时,我收到“资源耗尽;无法完成计算”错误:

I suggest that you insert constrains within solve command instead when defining functions:我建议您在定义函数时在 solve 命令中插入约束:

solve(l(p,v)=2 and u(p,v)=6 and 0≤p and p≤2*π,{p,v})

answer: v=4.答案:v=4。 and p=1.5707964860087 Also use expressions instead of functions, unless you have very good reason for, like:和 p=1.5707964860087 也使用表达式而不是函数,除非你有很好的理由,比如:

u:=v*√(1+(0.5)^(2)+2*0.5*cos(((2*−0.001*2*π)/(0.008))+p))
l:=v*√(1+(0.5)^(2)+2*0.5*cos(((2*−0.003*2*π)/(0.008))+p))

solve command and result are the same as above.求解命令和结果同上。 Of course, in this case solve will find the correct solution without any constrains:当然,在这种情况下,solve 会找到没有任何约束的正确解:

solve(l=2 and u=6,{p,v})

answer: v=4.答案:v=4。 and p=1.5707964860087 But it wont find any other solutions, and for some reason this doesnt work for the solution between 2 π and 4 π和 p=1.5707964860087 但它不会找到任何其他解决方案,出于某种原因,这不适用于 2 π 和 4 π 之间的解决方案

solve(l=2 and u=6 and 2*π≤p and p≤4*π,{p,v})

In that case, you can use zeros在这种情况下,您可以使用零

zeros({l-2,u-6},{p,v})|2*π≤p and p≤4*π

answer: [[7.8539817931882,4.]]答案:[[7.8539817931882,4.]]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM