Mathematica Definition and 1000 Threads

  1. M

    Mathematica Mathematica: moving point creating a curve

    Dear all, here is my animation of a simple plot: Animate[ ParametricPlot[ {Sin[tf], Cos[tf]}, {tf, 0, t}, PlotStyle -> {{Thickness[0.002], Red}, {Thickness[0.002], Blue}}, PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, AspectRatio -> Automatic], {t, 0.01, 100, 0.01}, AnimationRate -> 2...
  2. J

    Mathematica How can I convert a matrix to a list in Mathematica?

    Hi everyone: I would like to join all elements of on matrix into just one list: matrix = 1 2 3 4 5 6 7 8 9 into list = {1,2,3,4,5,6,7,8,9} Anyone has a solution for this? Thanks
  3. H

    Mathematica Help with "Which[] in a For loop using Mathematica

    Hello, I am a novice in Mathematica, but insisting to learn it. I would appreciate help in solving the following problem: (*a=1;Which[a==1,x,a==2,b]*) list := List[1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 32, 10] For[i = 1, i < 4, i++, a = list[[i]]; Print[a]...
  4. X

    MATLAB Matlab vs Mathematica for computing derivatives

    I'm trying to do a calculation which involves taking the derivative of a term that is millions of terms long. I'm using a supercomputer right now with Mathematica to do it but it's taking to long. Does Matlab have a faster algorithm for computing derivatives analytically?
  5. M

    Mathematica Using mathematica to reduce a system of n equations and m variables

    Hi guys, I have a system of six equations and thirteen variables. I would like to reduce it to seven free parameters. I used Reduce to solve it but it is taking really long (one full day and no output yet) and I think there must be a better way. Here is my code Y = {{y1}, {y2}, {y3}} T =...
  6. S

    Mathematica Mathematica - get value of function at certain x

    Hi, I am not really sure this is the right topic to post my question in, but it is homework so... To my data in txt file I fitted a function ##f(x)## where ##x\in [0,100]##. In the original file I had only 100 points, but now that I have a nice polynomial fit, I can get infinite number of...
  7. Safinaz

    Mathematica Finding the range of the paramter space in Mathematica

    If I have a function depends on for example 2 parameters f[a,b], and I know the value of this function should range between 300 < f < 400, how I know the possible ranges of the parameters in Mathematica. Bests, S.S.
  8. WannabeNewton

    Mathematica Solving ODEs with large parameters in Mathematica 9

    I have an ODE ##e^{2x}H(Hv'(x) + H'v' + Hv'') + (k^2 - 2e^{2x}H^2(1 + \frac{H'}{2H}))v = 0## where ##H(x)## is a known function that Mathematica has stored as an interpolation from a previous ODE and ##v(x)## is the unknown function to be solved for. ##k## is the adjustable parameter. Using...
  9. Hepth

    Mathematica [Mathematica] Bug in Integrate with derivatives of a delta function

    Integrate[f[qs] DiracDelta'[qs (1 - 1/x)], {qs, -\[Infinity], \[Infinity]}, Assumptions -> 0 < x < 1] Integrate[f[qs] DiracDelta'[qs - qs/x], {qs, -\[Infinity], \[Infinity]}, Assumptions -> 0 < x < 1] This is on Mathematica 8 for windows. The results differ by a sign. They are effective...
  10. N

    Mathematica Mathematica Plots Wrong: How is it Possible?

    I said to Mathematica to plot a graph as this: Plot[Exp[-Sqrt[-x]] + Exp[Sqrt[-x]] - 2 == 0, {x, -10, 40}]. You can see that there is square root of -x, which should mean that the function is defined only for x<=0. But no, Mathematica would plot a curve also for positive values of x. How...
  11. Hepth

    Mathematica [Mathematica] : Mathlink/Evaluation of a function using NMinValue/NMin

    I have a function that is defined using a variety of things, some matrix algebra, some mathlink functions, etc. But they are all defined to evaluate when called with the parameters : chi2[mb, vmc, v1, v2, v3, v4, 0.1066, 0.219] gives me a number back. I can even do a table over some range...
  12. N

    Mathematica FindFit doesn't work for me in Mathematica

    Hello, I want to fit a two-parameter function to two points in this way: FindFit[{{0, 1}, {1, 0}}, D + C *Log[-1 + Sqrt[-C^2 + (-1 + x)^2] + x], {C, D}, x] But Mathematica won't give the values for parameters C and D. Instead it says: "FindFit::nrlnum: "The function value {0...
  13. K

    Mathematica How to define functions with integer index in mathematica

    There is a vector ##v_i(t)## (i=1,2,3). How to define the three functions in Mathematica? What about ##t_{ij}(t,\vec{x})##? I am trying to solve my vector and tensor equtions with Mathematica. Analytical solution would be perfect but numerical solution would also be fine. Actually I am not...
  14. adjacent

    Mathematica [Mathematica] Number problem with digits

    Determine all three-digit number ,##N##, having the property that ##N## is divisible by 11, and ##\frac{N}{11}## is equal to the sum of the square of the digits of ##N##. This cannot be solved just by guessing. I think I should use mathematica for this,but, this sum of the digits is a scary...
  15. S

    Mathematica Why Does DSolve Work with s[x] but Not y[x] in Mathematica?

    So when i use the following command, I get the following error DSolve[y'[x] - y[x] == 3, y[x], x] DSolve::deqn: Equation or list of equations expected instead of False in the first argument False. >> But when i change the variable y[x] and y'[x] to s[x] and s'[x], It works why is this...
  16. E

    Mathematica Free alternative to Mathematica?

    In Mathematica, I computed the integral ##\lim\limits_{n\to\infty} \frac{1}{n^2} \int\limits_{0}^{\frac{\pi}{2}} \frac{\sin((2n+1)x)}{\sinh(x)} \ dx## and it incorrectly output the answer ##-\frac{3\pi}{2}##. I wanted to try a different CAS software that might provide a different answer, but so...
  17. M

    Mathematica Mathematica - How to make 3D plots flat

    Hello, I've been using mathematica the past few days and quite like it. I am trying to add some figures to my word document. Because of the size of the exported emf file from mathematica, I am unwilling to have a document that is 100MB in size. So I was searching for some ways to export...
  18. D

    Mathematica Collecting terms in mathematica

    I have an integrand with a handful of terms, and some of them have poles in the denominator of the form (x+c) (but not all). There are three poles in total, and I want to collect all the terms according to each pole individually (eg all the terms with (x-1) in the denominator, (x-5), etc.)...
  19. Rasalhague

    Mathematica Evaluating a derivative at a point in Mathematica

    If I define a function, such as f[x_, y_] := {-2 x + 2 x^2, -3 x + y + 3 x^2} I can compute the derivative with D[f[x, y], {{x, y}}] but what is the syntax for evaluating this derivative at a point?
  20. C

    Mathematica How Do I Handle Variables in Mathematica as a Beginner?

    Hello, I'm just testing out mathematica for the first time. I was hoping someone could help me make sense of this input (see attached screenshot). I'm sure I'll be running into more peculiarities as I get more comfortable with the software, Ill post them in this thread as the pop up. Help much...
  21. N

    Mathematica Mathematica calculates for ages

    Hello, I told Mathematica to do a few calculations as follows: a = 0; b = 1; n = 4; For[i = 0, i < n, i++, p = 2*x*b - 2*i*a; a = b; b = p] c = CoefficientList[p, x]; l = Length[c]; m = 0; For[i = 1, i < l + 1, i++, r = Abs[Part[c, i]]/Abs[Part[c, l]]...
  22. N

    Mathematica Defining a function in Mathematica

    Hello, I know that in Mathematica one can define a function as follows: f[x_]:=x^2. The problem is, I get a polynomial from a for loop as an expression p=a*x^n+b*x^(n-1)+... Now I want to evaluate the polynomial at a specific point. I tried to define a function from the polynomial as...
  23. S

    Mathematica How to get smaller-size eps figures from Wolfram mathematica?

    Dear every Mathematino-s in high energy physics I knew several workers in computer and mathematics, but few of them know wolfram mathematica software, so I think it is justified to let my question appear here. I use wolfram-mathematica to make 3D figures and want to use them...
  24. Hepth

    Mathematica Mathematica : Noncommutative Multiply and Replacement Rules

    Val[a_] := ToCharacterCode[ToString[a]][[1]]; GH[a].GH[b].GH[c].GH[d].GH[b] //. {GH[a_].GH[b_] :> If[Val[a] > Val[b], GH[b].GH[a], GH[a].GH[b]]} I have the noncommutative multiply of GH[a].GH[b].GH[c].GH[d].GH[b] My goal is to order these in increasing charcter value. (Val is the function...
  25. T

    Mathematica How to solve Solve x-2cosx=0 in mathematica

    Solve[x - 2 cos[x] == 0, {x}] this is my imput but i get an error. What is the command to solve trig functions in mathematica thanks. I searched online but no avail.
  26. N

    Mathematica Integrate vs. NIntegrate in Mathematica

    I'm trying to integrate the function Exp[-I*t*x - t^2/2] from -infinity to infinity using NIntegrate in Mathematica; the value that I get is accurate when x is small, but as x gets larger, the output from NIntegrate does not match the value I get when I use Integrate -- it gets less and less...
  27. G

    Mathematica Mathematica: f[a,b,c] = a*g[b,c], force evaluate

    Hey, Say I have a function f[a,b,c] which depends on another function g[b,c] such that: f[a,b,c] = a*g[b,c] If I input, f[a,1,2], mathematica spits out a*g[1,2] rather then actually evaluating what g[1,2] is. Is there a way I can force mathematica to evaluate g[1,2] so instead, e/g if g...
  28. Hepth

    Mathematica Mathematica : Integrate and a Log problem?

    Here is the code, I am using Mathematica 7 with no packages installed at the moment. $Assumptions = 0 < u <= 19/80 && I10 \[Element] Reals; FXN = Sqrt[(u - 15/16)^2 - 2/5 (u + 17/16) + 1/25] (I10 (u^2) - 1/u); PA = Integrate[FXN /. {I10 -> 1/2 Log[1/2]}, u]; PB = Integrate[FXN, u] /...
  29. kq6up

    Mathematica Mathematica vs. Other Math Apps

    I have been using Maxima to help me review to go back to grad school for physics. I think I might be running to the limits of its functionality (or maybe I just don't know how to use it correctly). I used to have a lot of experience with Mathematica, but their license system has grown to be...
  30. F

    Mathematica [Mathematica] FindFit/NonlinearModelFit with non-gaussian residuals

    Hi, I note that in the 'more info' for NonlinearModelFit it says that it assumes the values are normally distributed around the mean response function y, which I understand is required if one wants to use maximum likelihood methods and construct confidence intervals etc. However, there appears...
  31. C

    Mathematica Solving ODE numerically in Mathematica - 'ndnum' error?

    I'm trying to solve this ODE R'(t)=\frac{-a}{R(t)^2} numerically in Mathematica (a, b are non-zero constants). Here's what I have: NDSolve[{R'[t]==-a/R[t]^2, R[0]==b, WhenEvent[R[t]==0, end=t; "StopIntegration"]}, R, {t,0,1}] It's returning with NDSolve:::ndnum : Encountered...
  32. N

    Mathematica Tag × protected in Mathematica?

    Instead of giving the results of the calculation, Mathematica says: "Tag Times in 0 × 1.52098*10^11 is Protected." as in the attached file. Anyone has any idea how to get the results?
  33. Hepth

    Mathematica Mathematica : Easy? Function that returns and increases counter.

    I have a statement that looks like : vD.vD.vD.vD Where vD is noncommutative (but that doesn't really matter) I want to replace it so that each vD becomes v[a].D[a] But I would like it so the "a" is not repeating. So I need somehow a function that each time it is run returns it with...
  34. R

    Mathematica I have a problem with mathematica

    Hello,I need help in Mathematica,my problem is that I wrote the system of differential equations and I put a certain value of the variables and it is supposed that the value of the absolute of the determent would be zero but unfortunately I did not get zero , I got another answer when I put...
  35. M

    Mathematica Solve Error in Mathematica: Get Solution Here!

    Here is my code Nl = 10^(49) ; Nh = 100 ; b = 4*10^(-13) ; Rs = N[((3 Nl)/(4 Pi b Nh^2))^(1/3)]; a = 6*10^(-18) ; Solve[x/(4 Pi r^2) E^(-Nh a x) a Nl == (1 - x)^2 b Nh, x]When I run it, it shows the error: "Solve::nsmet: This system cannot be solved with the methods available to Solve. >>"...
  36. IridescentRain

    Mathematica How do I calculate an area in Mathematica?

    Hi! Say I have a region described by any number of inequalities. This region is a surface in 3D space. How can I ask Mathematica to calculate the region's area? If it helps, my particular region is the intersection of a hollow sphere and a solid (i.e. filled-out) toroid-like surface. I'm...
  37. Hepth

    Mathematica Mathematica : Pulling inputs from a function; methodology question.

    I have a heaviside function: HeavisideTheta[a,b,c,d,e,...] where the letters correspond to functions, and the number of functions is arbitrary. I want to make a replacement so that HeavisideTheta[a_]:> If[a>0,1,0] HeavisideTheta[a_,b_]:>If[a>0,1,0] If[b>0,1,0] or something similar. I wish...
  38. H

    Mathematica Mathematica NDSolve conditions help

    Hi, I'm having a problem with NDSolve in mathematica where it is interpreting my initial conditions as "True" or "False". Here is the code: soln = NDSolve[{eqn1[[1]], eqn1[[2]], x[0] == y[0] == 0, x'[0] == 1, y'[0] == 0}, {x, y}, t]; where eqn1 is determined by the following code...
  39. Safinaz

    Mathematica Mathematica ListPlot: Plotting a Continuous Graph

    Hi all, I have a function varying in mass varible as 1000 - 1500-2000, etc, I made a list of the values of this function for these values of mass but when I plot by mathimatica by ListPlot it appears some how discerte between the points I defind not a continus graph. So any help to...
  40. D

    Mathematica Mathematica: Simplifying a feedback system

    Hi, I have given a complex feedback system in z domain like: Y = 2*W2 + E W2 = z^-1/(1-z^-1) * (W1 + (1-z^-1)*W2 - 1/2*(1-z^-1)*Y) W1 = V - Y + z^-1/(1-z^-1) * 1/2 * (V - Y) where Y is the system output, V is the system input, W1 and W2 are intermediate nodes and E is an error input...
  41. N

    Mathematica Solving an algebraic-integral equation in Mathematica

    Hi, I'm trying to solve an algebraic-integral equation (I don't know if this is the proper description of this class of equations, it just seems like the least wrong way to describe them) and have run into several issues that I'll describe below, but first I'll outline the problem. I'm...
  42. A

    Mathematica Help with Mathematica Issue: Solving Nonlinear Second Order ODE

    Mathematica Issue -- Help! Hello! I am new to Mathematica and i tried to solve a non linear second order ode... The result is that nothing happens... I mean that i get as output the same line as i write in input.. For example, my problem is: (thats what i get) In[33]:= DSolve[ g - b x - c...
  43. Hepth

    Mathematica Mathematica Bug : Integrate and DiracDelta

    I have found that while these two should be the same, mathematica does not evaluate them equally. Integrate[(a + b el + c el^2) DiracDelta[u], {u, 0, 1}, {el, e1, e2}] Integrate[ Integrate[(a + b el + c el^2) DiracDelta[u], {el, e1, e2}], {u, 0, 1}] I believe the second one is correct...
  44. M

    Mathematica Mathematica: Generate Surface Equation

    Hi there, I just began using Mathematica today and I was wondering if there is a way to make the program generate an equation of a surface given a 3d array? What I need it to do is to give me an equation of the surface so that given any two variables I can find the value of the third one...
  45. E

    Mathematica Use DO loop in Plot order at mathematica 8

    Can anyone help me to in this problem? I want to use DO loop in Plot order at mathematica 8, how can I do this? I want to change one variables and see the changes in other variables in the graph, and want to plot all of my graph in one Plot order. Like this. I Uploaded my file too.
  46. F

    Mathematica Help with Mathematica? Find Dictionary Lengths & Longest Words

    Part A: Get the list of pairs of the form {language,number of words in dictionary}. Call this list Alength. What I did: lang = DictionaryLookup[All] to get all the languages. Then, Alength = {Length[DictionaryLookup[{"Finnish", All}]], Length[DictionaryLookup[{"Arabic", All}]]}...}...
  47. admbmb

    Finding Shortest Distance between two 3d Parametrized Curves

    So I have two parametrized equations for two different 3d curves: Rm(t) = (1.2*sin(2πt) + 0:3)i + t4j + 1.1cos2(2π(t + 0:2))k and R(t) = Sin(2πt)i + t3j + Cos2(2πt)k I need to figure out if these two curves come within a certain distance of each other (0.5). I cannot understand how to find...
  48. G

    What is causing the NMinimize error in my Mathematica calculation?

    What wrong with my calculation.the problem is from the attachment. It keeps saying: NMinimize::nnum: "The function value {10721.1} is not a number at {rs,x} = {1.91862,1.66351}. " My code: XDDO154[x_, rs_] := Sum[(DDO154vobs[[i]] - Sqrt[(4 Pi*(43.040600502)*x*...
  49. S

    Mathematica: Illustrate a 3D vector field

    Homework Statement Hi, Firstly, let me apologize if this is not exactly the right topic to ask this questions. But since it is homework and since most of the Physicists for sure illustrate a 3D vector field, I decided to post it here. Attached I have two files with 3D vectors. How does...
  50. J

    Poincaré Sections of the double pendulum with Mathematica

    I need to plot a Poincaré map for a double pendulum where the string connecting one mass to the other is elastic with elasticity constant k and rest length s. The equations of motions are: \dot{\theta}_1= \frac{p_{\theta_1}}{m_1 r_1^2} - \frac{p_{\theta_2}}{m_1 r_1 r_2} \cos{(\theta _1-...
Back
Top