algebra

Is it possible to solve an algebraic equation in R?

╄→尐↘猪︶ㄣ 提交于 2020-12-01 10:53:26
问题 I want to find the solution of: -x^3+6*x^2+51*x+44=0 but with R. Is it possible? I found the package Ryacas, but nobody seems to be able to make it work. May sound trivial, but I'm not able to find an easy way to do this... Do you have an alternative? Thanks guys! 回答1: You can use polynom package: library(polynom) p <- polynomial(c(44,51,6,-1)) # 44 + 51*x + 6*x^2 - x^3 solve(p) # [1] -4 -1 11 But you simply can use the function polyroot from base package: polyroot(c(44,51,6,-1)) # [1] -1+0i

Mathematical (Arithmetic) representation of XOR

心已入冬 提交于 2020-08-21 05:20:37
问题 I have spent the last 5 hours searching for an answer. Even though I have found many answers they have not helped in any way. What I am basically looking for is a mathematical, arithmetic only representation of the bitwise XOR operator for any 32bit unsigned integers. Even though this sounds really simple, nobody (at least it seems so) has managed to find an answer to this question. I hope we can brainstorm, and find a solution together. Thanks. 回答1: XOR any numerical input a + b - ab(1 + a +

How can I construct a matrix given a generator for this cyclic group?

倾然丶 夕夏残阳落幕 提交于 2020-06-16 04:12:46
问题 Let F[q^p] be a finite cyclic set of polynomials, where q is a prime number and p is an integer greater than 0. Each element in F[q^p] will be a polynomial up to degree (p-1) under (mod q). Ex: F[2^2]={0,1,x,1+x} Ex: F[3^4]={0,1,2,0+x,1+x,2+x,0+x^2,1+x^2,2+x^2,x+x^2,1+x+x^2,2+x+x^2,2x+x^2,1+2x+x^2,2+2x+x^2,0+2x^2,1+2x^2,2+2x^2,x+2x^2,1+x+2x^2,2+x+2x^2,2x+2x^2,1+2x+2x^2,2+2x+2x^2,...,2+2x+2x^2+2x^3} Thus, there will be q^p elements in F[q,p]. Assume that we have a generator theta, where theta

Problems with formula to output a triangle waveform in Java

人盡茶涼 提交于 2020-06-14 07:59:52
问题 I got my wave file creator working and I split it into three classes, I also made a sinewave generator that inherits from an abstract class called waveform and I can export 8 and 16 bit mono or sterio sine waves. I am trying to make a class called TriangleWave Generator to output a triangle wave tone, but I can't get the algebra from https://en.wikipedia.org/wiki/Triangle_wave#, the first formula, to work. It will only export the highest harmonic stated and not blend them together with the

How does a system like Wolfram Alpha or Mathematica solve equations?

岁酱吖の 提交于 2020-05-22 16:09:13
问题 I'm building a web-based programming language partially inspired by Prolog and Haskell (don't laugh). It already has quite a bit of functionality, you can check out the prototype at http://www.lastcalc.com/. You can see the source here and read about the architecture here. Remember it's a prototype. Currently LastCalc cannot simplify expressions or solve equations. Rather than hard-coding this in Java, I would like to enhance the fundamental language such that it can be extended to do these

C# library for algebra simplification and solving [closed]

依然范特西╮ 提交于 2020-05-09 19:36:39
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . There are quite a few algebra solvers and simplifiers on the web (for example, the decent one at algebra.com). However, I'm looking for something I can plug into C# as part of a larger project (I'm making my own calculator, but obviously I'd ask permission etc.). Ideally, I'd use code

C# library for algebra simplification and solving [closed]

人盡茶涼 提交于 2020-05-09 19:36:29
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . There are quite a few algebra solvers and simplifiers on the web (for example, the decent one at algebra.com). However, I'm looking for something I can plug into C# as part of a larger project (I'm making my own calculator, but obviously I'd ask permission etc.). Ideally, I'd use code

C# library for algebra simplification and solving [closed]

。_饼干妹妹 提交于 2020-05-09 19:36:16
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . There are quite a few algebra solvers and simplifiers on the web (for example, the decent one at algebra.com). However, I'm looking for something I can plug into C# as part of a larger project (I'm making my own calculator, but obviously I'd ask permission etc.). Ideally, I'd use code