Wolfram Mathematica

Possible Bug in LinearSolveFunction with Sparse Vectors

Bug introduced in 5.0 and fixed in 11.0 LinearSolveFunction is new in 5.0 Consider the following set of equations and corresponding variables: eqns1 ={2 x == 2 - 4 y, 3 y == 4 z, 2 z + 4 t == 3, 3 t + 2 z == 5}; vars ....

Brooklyn Brooklyn: 7 hours ago

Wolfram Mathematica

The fastest way of raising indices of high rank tensor

I have some high dimensional high rank tensors, let's say $$F_{ijkl}$$ and I need to find $$F^{abcd}=g^{ai}g^{bj}g^{ck}g^{dl}F_{ijkl}.$$ Here $g^{ij}$ is the contravariant metric. Simple summation in Mathematica takes way to much time Do]=Sum]g]g]g]g],{i,1,dim},{j,1,dim},{k,1,dim},{l,1,dim}],{a,1,dim},{b,1,dim},{c,1,dim},{d,1,dim}] But I can sum over first and last index using matrix multiplication, so first I calculate $F^a{}_{ij}{}^d$ ....

Leo Leo: 7 hours ago

Wolfram Mathematica

InputField as both in- and output fields with ContinuousAction

Many years ago, I made a handy little program in Flash. It consisted of a number of input fields, each representing a variable that was dependent on all the others. As soon as any field changed, the other followed, no matter which of them I changed. So they where effectively ....

Nolan Nolan: 7 hours ago

Wolfram Mathematica

Maximizing a function with assumptions

Using f := Log/s When I run the following line: Assuming,s]] I get the following output: Maximize/s, s] Actually, Mathematica ignores the assumptions and outputs the function only. That is, nothing is done by Mathematica. I know that Assuming works with Refine, Simplify, and Integrate. But, is there any way ....

Carson Carson: 8 hours ago

Wolfram Mathematica

How can I find different areas of triangles from a list of points?

If I have a list of points such as {{1, 1}, {4, 7}, {24, 67}, ..., {17, 83}}, how can I find the area of triangles formed by different combinations of these points? For example, what code would I need to find the area of the triangle formed by {{1, ....

Hailey Hailey: 8 hours ago

Wolfram Mathematica

How to use Through by default on numeric functions?

I've used the following code to simulate defining operations between functions: ThroughFunctions := expr//.{ x_?NumericQ -> x, (f_/;MemberQ, NumericFunction]) :> Through] } $Pre = ThroughFunctions; Since it's assigned to $Pre the substitution occurs without having to wrap the expressions in the function ThroughFunctions: In:=(Cos^2/(3+Sin)) Out=Cos^2/(3+Sin) The problem with this is ....

Penelope Penelope: 9 hours ago

Wolfram Mathematica

Labeling points with numbers in a Graphics expression

Can I label points with numbers in my Graphics expression, as in this picture Here is my code. Off {α, γ, ω} = {0.1, 0.05, 1}; T = (2 π)/ω; a = NDSolve - γ (1 - x^2) x' + x == α Cos, x == 0, x' == 0}, ....

Jade Jade: 11 hours ago

Wolfram Mathematica

Eliminate 3 Variable from 4 Equations

I am trying to use Mathematica to Eliminate 3 following variable from 4 equations. Any clue or link to similar solved problem is highly appreciated: eq = { Cos + Cos + Cos == a, Sin + Sin + Sin == b, Cos + Cos + Cos == c, Sin ....

Nora Nora: 11 hours ago

Wolfram Mathematica

How to find and verify relationships between functions?

MMa gave me a complicated result involving Hypergeometric0F1's. It was much less complicated after I discovered this identity: Hypergeometric0F1 = BesselJ 1) Is there a way to get MMa to validate relationships between functions, for example if I wasn't sure the identity above was true? FullSimplify - BesselJ] does return ....

Miles Miles: 12 hours ago

Wolfram Mathematica

NMaximize - global maximum fail - How to?

Problem : Let x,y,z be non-negative real number whose sum is 1. Find maximum of 0.2x + 0.2y + x^2*z + y*z^2 What I did first was reducing variable. 0.2x + 0.2y + x^2(1-x-y) + y(1-x-y)^2 with constraint x>=0, y>=0, x+y<=1 Mathematica code is NMaximize and I got {0.226147,{x->0.,y->0.455858}} But ....

Leilani Leilani: 12 hours ago