equation

Using Maxima, I want to solve equations using bit-shifts operations

First, I've tried the stuff you get using "load(functs)", no thank you. I have some pretty complex equations that I'd like to evaluate in Maxima. But at one step in the process I split a register in it's most-significant and least-significant components, and I need to be able to do that in Maxima -- if I am to evaluate the class of te...

Create grid out of number of elements

Ok here's what I'm trying to accomplish. Say I have 100 items. I want to create a "grid"(each Item consisting of an x, y point). I want the grid to be as close to a square as possible. Is there any kind of math to determine the grid width, and grid height i'd need by just a single number?(By grid width and height I mean the number of x i...

Why does C give me a different answer than my calculator?

I've run into an odd problem with this code: legibIndex = 206.385 - 84.6 * (countSylb / countWord) - 1.015 * (countWord / countSent); This is the calculation for the legibility index of a given text file. Since this is a homework assignment, we were told what the Index should be (80, or exactly 80.3) My syllable count, word count, and...

render users' equations in Python

Hello all! I am a very new/inexperienced Python programmer. I teach maths and am trying to create a GUI graph-plotting package suitable for schoolchildren. As well as plotting a graph, I would ideally like to render the equation a user enters [eg. y = (x^2)/3] in a nicely formatted style - ideally updating in real-time as the user enter...

How do you flip an equation (exchange LHS with RHS) in Maple?

I have an equation which has been reduced to the form eqn1 := f(x,y,z) = T; Now I have another equation that involves T as a variable eqn2 := g(T,x,y,z); I want to replace T with f(x) in eqn2. If I had eqn1 in the form eqn1better := T = f(x,y,z); Then the following command would do what I want. algsubs(eqn1better, eqn2); So ...

Is it possible to plot implicit equations using Matplotlib?

Hello all - many thanks again to people who have kindly offered help (especially to Mark for his outstanding response to my previous question). I would like to plot implicit equations (of the form f(x,y)=g(x,y) eg. x^y=y^x) in Matplotlib. Is this possible? All the best, Geddes ...

How to format contour lines from Matplotlib

Hello - I am working on using Matplotlib to produce plots of implicit equations (eg. y^x=x^y). With many thanks to the help I have already received I have got quite far with it. I have used a contour line to produce the plot. My remaining problem is with formatting the contour line eg width, color and especially zorder, where the contour...

how to handle an asymptote/discontinuity with Matplotlib

Hello all. Firstly - thanks again for all your help. Sorry not to have accepted the responses to my previous questions as I did not know how the system worked (thanks to Mark for pointing that out!). I have since been back and gratefully acknowledged the kind help I have received. My question: when plotting a graph with a discontinuity/...

multidimensional vector rotation and angle computation -- how?

Input: two multidimensional (for example dim=8) vectors a and b. I need to find out the "directed" angle (0-2*Pi, not 0-Pi) between those vectors a and b. And if they are not parallel I need to rotate vector b in plane a,b by "directed" angle L. If they are parallel, plane does not matter, but angle of rotation is still the same L. For...

How to label each equation in align environment?

Hi, I wonder how to label each equation in align environment? For example \begin{align} \label{eq:lnnonspbb} \lambda_i + \mu_i = 0 \\ \mu_i \xi_i = 0 \\ \lambda_i [y_i( w^T x_i + b) - 1 + \xi_i] = 0 \end{align} only label the first equation and only the first equation can be referred later. Thanks and regards! ...

number several equations with only one number

Hi, How can I number several equations in a align environment using only one number? For example \begin{align} w^T x_i + b \geqslant 1-\xi_i \text{ if } y_i=1, \nonumber \\ w^T x_i + b \leqslant -1+\xi_i \text{ if } y_i=-1, \end{align} The numbering will appear next to the second equation. But it would be better if it appears betwe...

Typesetting LaTeX fraction terms to be larger in an equation

I have the following formula in LaTeX, based on Fisher's Exact Test. (NOTE: requires the use of the amsmath package for \binom.) \begin{equation} P(i,j) = \sum_{x=|N(V_i) \cap V_j|}^{\min\{|V_j|, |N(V_i)|} \frac{ \binom{|V_j|}{x} \binom{|V - V_j|}{|N(V_i)| - x}} {\binom{|V|}{|N(V_i)|}} \end{equation} This renders the fract...

Calculate cubic bezier T value where tangent is perpendicular to anchor line.

Project a cubic bezier p1,p2,p3,p4 onto the line p1,p4. When p2 or p3 does not project onto the line segment between p1 and p4, the curve will bulge out from the anchor points. Is there a way to calculate the T value where the tangent of the curve is perpendicular to the anchor line? This could also be stated as finding the T values w...

solve mathematical equation with 1 unknown (equations are dynamically built)

Hi, I have to built dynamically equations like following: x + x/3 + (x/3)/4 + (x/3/4)/2 = 50 Now I would like to evaluate this equation and get x. The equation is built dynamically. x is the leaf node in a taxonomy, the other 3 nodes are the super concepts. The divisor represents the number of children of the child nodes. Is there a l...

6^x = 5 equation, how to solve it?

If it would be 6^x = 1 or 6^x = 6 or 6^x = 36 it would be extremely easy, but how to solve this equation: 6^x = 5 I don't need an answer, I want to find out how to solve equations like this one, I need solution. Thanks. ...

Computing complex math equations in python

Are there any libraries or techniques that simplify computing equations ? Take the following two examples: F = B * { [ a * b * sumOf (A / B ''' for all i ''' ) ] / [ sumOf(c * d * j) ] } where: F = cost from i to j B, a, b, c, d, j are all vectors in the format [ [zone_i, zone_j, cost_of_i_to_j], [..]] This should produce a vecto...

Python program for NIST randomness equation

There is a recurrence equation on page 1789 of this paper and I need some help making a python program to calculate pi_i. I have no idea what is going on here. Other references:original paper, pages (according to adobe, not the physical pages) 43 and 86 edit and i had already deleted what i wrote because all the answers i got were 0, ...

generating equation png files based on mathematical input

I was wondering what options were available to generate .png based on the kind of input one feeds a graphing calculator.. so (y^2 + 5x + 3) / ((3x + 3) + 5y + 18) would return The only thing I've found so far is texvc in mediawiki, but it seems overkill to get the whole mediawiki for one of it's modules. ...

C# dll to solve simple equation

Hello, I am looking for a C# dll to solve simple equation. Example .. 10 = 2 + 3 + x Result should be x = 5; Is this is free DLL? ...

Solving a system of equations programmably?

Possible Duplicate: System of linear equations in C++? I have the following 2 systems of equations: For a,b,c,d: 0 = a * r1_x + b * r1_x * r1_y + c * r1_y + d 1 = a * r2_x + b * r2_x * r2_y + c * r2_y + d 0 = a * r3_x + b * r3_x * r3_y + c * r3_y + d 1 = a * r4_x + b * r4_x * r4_y + c * r4_y + d For e,f,g,h: 0 = e * r1_x ...