Mathematica Definition and 124 Discussions

Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow symbolic computation, manipulating matrices, plotting functions and various types of data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other programming languages. It was conceived by Stephen Wolfram and is developed by Wolfram Research of Champaign, Illinois. The Wolfram Language is the programming language used in Mathematica.

View More On Wikipedia.org
  1. MarkTheQuark

    Plotting a parameter Plane of a spring pendulum in Mathematica

    I'm reading an article about the order-chaos-order sequence of a spring pendulum [Ref 1], as I'm reading it I'm trying to reproduce the graphs and results through Mathematica. However, I am new to this software. I will list below some of the most important equations mentioned in the paper. "In...
  2. M

    Mathematica How to simplify expressions in Mathematica with log and exp in them?

    Hi, This is a pretty simple question, but I am new to Mathematica so I am not sure if I am missing something obvious. Question: How do I make the expression ## e^{log(z)} ## return z? Attempt: I have used all of the following combinations and all of them return ## e^{log(z)}##. Are there any...
  3. F

    I Infinite Square Well with an Oscillating Wall (Klein-Gordon Equation)

    I am trying to numerically solve (with Mathematica) a relativistic version of infinite square well with an oscillating wall using Klein-Gordon equation. Firstly, I transform my spatial coordinate ## x \to y = \frac{x}{L[t]} ## to make the wall look static (this transformation is used a lot in...
  4. C

    Can I improve the sinc interpolation?

    Hello everyone. I am working with mathematica, where I have developed a two-dimensional shannon interplation, just as can be seen in the slides 15 to 18 of this presentation. The code is as follows: savedX = Table[XposX = mat[[All, 1]]; YposX = mat[[All, 2]]; windXVal = mat[[All, i]]...
  5. J

    Conversion from Mathematica to Matlab

    Hello!. I am new to the forum and I am also a newbie to programming. I want to convert a Mathematica code to Matlab, but I don't understand how to translate these lines. This code is Mathematica 5.0. defvar := Module[{a}, Clear[ cN, cNf, ginix ]; Clear[ Nh, Nhf, gini ]; cN =...
  6. C

    KarhunenLoeveDecomposition function in Mathematica

    Hello everyone. I have a vector, stochasticData.mat, it contains a matrix of size 211302*50, being 211302 measurements of 50 realizations of a stochsatic process. I want to use the Karhunen-Loève expansion and the software Mathematica to calculate the uncorrelated random variables. For that, I...
  7. S

    Mathematica Definite integral with some unknown variables

    I am trying to evaluate an integral with unknown variables ##a, b, c## in Mathematica, but I am not sure why it takes so long for it to give an output, so I just decided to cancel the running. The integral is given by, ##\int_0^1 dy \frac{ y^2 (1 - b^3 y^3)^{1/2} }{ (1 - a^4 c^2 y^4)^{1/2} }##
  8. JD_PM

    Mathematica Is Mathematica the best option to compute the eigenvalues?

    I am wondering what's the best option to compute the eigenvalues for such a determinant $$\begin{vmatrix} \sin \Big( n \frac{\omega}{v_1} \theta \Big) & \cos \Big( n \frac{\omega}{v_1} \theta \Big) & 0 & 0 \\ 0 & 0 & \sin \Big( n \frac{\omega}{v_2} (2 \pi - \theta) \Big) & \cos \Big( n...
  9. S

    A Calculating the Gravitational wave spectrum with Inflation as a source

    I am interested in knowing how to calculate the gravitational wave (GW) spectrum with inflation as a source, I have some background in inflation but I am not so familiar about calculating the GW spectrum. I am reading a paper (https://arxiv.org/abs/0804.3249) about it, however, a big part of it...
  10. P

    What specs should I look for in a laptop

    After completing my sophomore year at college as a Physics major and I realized that the laptop I currently have is not able to keep up with the demand I put it under for school. The laptop I currently have has a <2 hour battery life and has been known to crap out (didn't know how else to...
  11. S

    Mathematica Solving 2-D partial integro-differential equation

    While reproducing a research paper, I came across the following equation, ∂f/∂t−(H(f)(∂f/∂x)=0 where [H(f)] is hilbert transform of 'f.' and f=f(x,t) and initial condition is f(x,0)=cos(x) and also has periodic boundary conditions given by F{H{f(x′,t)}}=i⋅sgn(k)F{f(x,t)}, where F(f(x,t) is...
  12. Ackbach

    Wolfram releases the free Wolfram Engine for Developers

    Wolfram made what I would call a gigantic move: they released the Wolfram Engine for Developers - for zero cost! The idea of the Engine is primarily that you can call and run Wolfram Language commands from lots of different sources. I am not the kind of person to automate Mathematica, although...
  13. A

    Mathematica Calculating traces with FeynCalc

    Hello everybody! I need a little help with FeynCalc. I think the problem is really simple but I can't find how to fix it. I want to evaluate a trace coming from a Feynman diagram. Since the particles are all massless, I want to impose the condition on the momentum ##p^2=k^2=p'^2=0##. I've...
  14. A

    Mathematica plotting

    Homework Statement Homework Equations E= kq/r^2 * r-hat where q= +/-(1.6*10^-19) The Attempt at a Solution x= (1.6*10^-19)*x/(x^2+y^2+(z+1)^2)^(3/2) - (1.6*10^-19)*x/(x^2+y^2+(z-1)^2)^(3/2) y= (1.6*10^-19)*y/(x^2+y^2+(z+1)^2)^(3/2) - (1.6*10^-19)*y/(x^2+y^2+(z-1)^2)^(3/2) z=...
  15. A

    Using Mathematica to solve an ODE

    Homework Statement Homework Equations The Attempt at a Solution I used the NDSolve function from mathematic but its giving me problems. What is the correct way to enter the equation?[/B] soln = NDSolve[{y''[t] = (-9.8/5)*sin (t), y[0] = 20, y, {x, 0, 12}}]
  16. C

    Mathematica Cannot do the integral of the Hyper-geometric function?

    Dear friends: It's strange that Mathematica can do the integral of ##\int_0^\infty dx~x~_2F_1(a,b,c,1-x^2)##, however, fails when it's changed to ##\int_0^\infty dx~x~_2F_1(a,b,c,1-x-x^2)##. Are there any major differences between this two types? Is it possible to do the second kind of integral...
  17. L

    Linear Algebra - Find an orthogonal matrix P

    A problem that I have to solve for my Linear Algebra course is the following We are supposed to use Mathematica. What I have done is that I first checked that A is symmetric, i.e. that ##A = A^T##. Which is obvious. Next I computed the eigenvalues for A. The characteristic polynomial is...
  18. C

    Mathematica Is this a bug in Mathematica 11 ?

    I calculated a simple complex function integration using Mathematica 11. As the screenshot shows, the only difference between the two inputs is that I set a = 1 in the second one. However, the two outputs differ by a factor of 2. What's wrong? Is this a bug?
  19. Necmi

    Mathematica Solve Perturbation problem with mathematica

    u'(1-epsilon(u')^2)=-y uo(1)=0 u1(1)=0 I need solve this problem with mathematica.
  20. RicardoMP

    Mathematica How to append functions to a list of functions?

    My objective is to make a list of functions and afterwards be able to make operations with those functions. Hyfield[list_, bits_] := Module[{i, auxList, Hy}, auxList[a_] := List[]; For[i = 1, i <= bits*2, i++, auxList[a] = Append[auxList[a]...
  21. W

    Mathematica Is the integral for current correct?

    Hi, I am using Mathematica to calculate density of states and current of the Green's function times self energy in most simple form. I am not sure if I am getting current integral over energy implemented correctly. Shouldnt first current plot be a line with a slope? Below is my code...
  22. W

    Mathematica Add a rectangle to a plot to indicate range

    I have some data points that I want to plot and suppose I have the function ##f(x) = x##, with the domain having the range ##0\leq x \leq 10##. Assume that the experimental values lies in the range ##4\leq x \leq 7##, how can I put a rectangular region to cover this range behind my plot so as to...
  23. M

    A EoM in Schwarzschild geometry: geodesic v Hamilton formalism

    Hi there guys, Currently writing and comparing two separate Mathematica scripts which can be found here and also here. The first one I've slightly modified to suit my needs and the second one is meant to reproduce the same results. Both scripts are attempting to simulate the trajectory of a...
  24. hbz88

    Mathematica For looping problem not getting answer

    Hi, I need some helps. I try to run the code below but its keep give me the value of intial value. Q = 1415; \[Mu] = 1000; \[Sigma] = 500; double dx; double x; double fx; double fxplusdx; double I1; double I2; I1 = 0; I2 = 0; For[x = 0, x <= Q - dx, dx += 0.01, fx = PDF[NormalDistribution[0...
  25. Q

    Mathematica Mathematica: Convolution Integral

    Hi all! I'm new to Mathematica. I have written a code for performing a convolution integral (as follows) but it seems to be giving out error messages: My code is: a[x_?NumericQ] := PDF[NormalDistribution[40, 2], x] b[k_?NumericQ, x_?NumericQ] := 0.0026*Sin[1.27*k/x]^2 c[k_?NumericQ...
  26. W

    Mathematica Rescaling equations in Mathematica

    Suppose I have a differential equation $$\ddot \phi + 3H (1+Q) \dot \phi + V_{,\phi} = 0$$ where ##\phi## is the inflaton field. ##H## is the Hubble parameter, ##Q## is just a number, ##V_{,\phi}## is the derivative with respect to ##\phi##, and initial conditions given by ##\phi[0] = 2...
  27. F

    Mathematica Plotting with base 10 as the interval

    I want to plot a function f(x) such that it's domain is from 1 to 10000 but I want the graph to read 1, 10, 100, 1000, 10000 in the x-axis, while the y-axis is normal. ##f(x) = 2\sin^{-1} ( e^{-\frac{60}{x}})##
  28. S

    I Hubble term versus inflaton

    From cosmology, ##H^2 = \frac{ρ}{3M_p^2} = \frac{1}{3M_p^2}(½\dot φ^2 + ½m^2φ^2)## Suppose ##V(φ) = ½m^2φ^2## where ##ρ## = density ##M_p## = planck mass I want to graph ##H## vs. ##φ## but there is a ##\dot φ## and I know this is a differential equation, can somebody help me what to do here?
  29. S

    Mathematica Numerical Simulations

    I'm very new to Mathematica/programming and I want to do a theoretical calculation using Mathematica, suppose I have, ##Y=CX,~~~C=constant## Now, I want to plot Y vs. X but X should run at every point since every point is a solution for Y, how should I do this? Before, I was thinking maybe I...
  30. ShadowMeson

    Declare a Commutation Relationship in FeynCalc

    Homework Statement I am a rookie to the QFT extension in Mathematica called FeynCalc, and tried to use that into solving some quiz. Soon I met a problem upon some condition presented in a problem which declares an relation of two same tensor with different indices results in some value when...
  31. Stella.Physics

    Mathematica Graph Plotting Problem in Mathematica

    Hello to all. I've been trying to plot some graphs on Mathematica but I have faced some troubles so far. I am working on this paper by Lattimer on binary systems: https://arxiv.org/abs/astro-ph/0002203 I am trying to reproduce Figure 11 but something seems to go wrong. Here's what I have...
  32. defaultusername

    Curvature using Mathematica

    Homework Statement Use Mathematica to calculate the Gaussian curvature of the plane Ax+By+Cz=D, in which A, B, C, and D are constants and C≠0. Use the following data: Homework Equations The Attempt at a Solution First I found the line curvature. As here: That code gets the result...
  33. GW150914

    Physics Why wouldn't astronomers use Mathematica?

    Mathematica is fully functional for daily astronomy data analyzing works, and it is much more convenient than python, so why can't them use Mathematica instead of python? It's like when you have warp drive you still travel through space using chemically powered traditional rockets, which is...
  34. C

    Mathematica Trying to define a integrating function in Mathematica

    I need to define a function that integrates a function in some interval and returns its numerical value. I am not allowed to use built in functions for integrating in Mathematica. This is my code that won't work: http://pokit.org/get/?93856fe8f2070ba781028f8634b9ac3a.jpg This is a code from a...
  35. N

    Mathematica How to remove I.0 from output?

    As I found on many websites, they suggest to use Chop[]. I tried that already but it doesn't work. This is my output. {{2 (Conjugate[ I.0] I.0 + (Conjugate[I.0] + Conjugate[Subscript[v, 1]]/Sqrt[ 2]) (I.0 + Subscript[v, 1]/Sqrt[2])) Subscript[\[Lambda], 1] (Conjugate[I.0]...
  36. E

    Mathematica Numerical vs. Monte-Carlo Simulations

    I have an integration that doesn't have a solution in the table of integrals. So, I evaluated it using Mathematica using the command NIntegrate. However, when I compare the result with Monte-Carlo simulations, there is a very small constant gap between the two curves. Is it because of the...
  37. E

    Mathematica Tag Times is Protected

    Hey, I'm unsure why the following returns an error: Any ideas on how to fix this?
  38. Mr. Rho

    Mathematica Rotation of 3D Plot using Euler angles

    So, I'm trying to plot a 3D "dipole" (an arrow with a small torus around it basically) in mathematica, and want to rotate it according to Euler angles... I use this code for the rotation matrix: rot[a, b, g] := RotationMatrix[g, {1, 0, 0}].RotationMatrix[b, {0, 1, 0}].RotationMatrix[a, {0, 0...
  39. K

    Mathematica FindMaximum function in Mathematica

    I recently plotted a piecewise function: Plot[Piecewise[{{1 - Exp[-.002*t], 0 <= t < 120}, {-Exp[-.002*t] + Exp[-.002*(t - 120)], 120 <= t}}], {t, 0, 5000}, PlotRange -> {0, 0.25}] I then defined the function which I am calling q[t_] as follows: q[t_] := Piecewise[{{1 -...
  40. K

    Mathematica Mathematica not plotting

    Homework Statement I've entered the following piecewise equation into Mathematica: Plot[Piecewise[{{sin (t), 0 <= t < \[Pi]}, {5 + 5 cos (t) + sin (t), \[Pi] <= t < 4*\[Pi]}, {10 cos (t) + sin (t), 4*\[Pi] <= t}}], {t, 0, 20*\[Pi]}] But I am getting a blank graph in return. I've proofread my...
  41. Clarence Liu

    Using Mathematica to solve for Jacobi Identity

    Hi everyone, I'm new to Physics Forums and to Mathematica, as well as Jacobi Identity. In any case, I was wondering on how I may use Mathematica to solve various Quantum Mechanics related problems through commutators. Like if it's possible to find out what is the form of a particular commutator...
  42. piJohn1411

    Mathematica Is it possible to colour the rows or columns of a matrix?

    Hi, I was wondering if it's possible to colour the rows and columns of a matrix in mathematica. I have received help from another forum and the code of my matrix is the following: Rasterize@ Style[MatrixForm[{{n, -1 + n, -2 + n, \[CenterEllipsis], 1}, {2 n, 2 n - 1, 2 n - 2...
  43. Q

    Finding a unitary transformation between two quantum states.

    I have to find a unitary transformation that takes me from one quantum state to another (or if there is such a transformation), given the two quantum states in matrix form. The matrices are huge (smallest is 16x16) , so doing it on paper is not an option. Does anyone know how I can do this in...
  44. O

    I Using Mathematica vs pen and paper in Physics

    Hi! I'd like to discuss your experiences with pen and paper vs software. Especially young people are welcome to join the discussion :) I'm wondering if there are people who do *most* of the symbolic calculations on a computer. I am very familiar with pen and paper and I've been wondering...
  45. J

    Mathematica: Animate multiple sets of XY data

    I have nine sets of data with x,y coords that are the position of a particle. I can ListPlot the particle positions on a single plot, but, I want to animate this. ListPlot[{mydata1, mydata2, mydata3, mydata4, mydata5, mydata6, mydata7, mydata8, mydata9}, PlotRange -> {{-1, 20}, {-1, 20}}] I...
  46. G

    Mathematica Kaluza-Klein Reduction Via Mathematica

    Does any know how to perform Kaluza-Klein reduction via mathematica? The task becomes very tedious if the job is done manually when successive reductions are done.
  47. K

    Mathematica Mathematica: How to use two x-axis with different units?

    Hello, I've collected data with pairs of { resolution, filesize in bit }. Now I would like to use a ListPlot to visualize the data in mathematica. My problem is now showing the x-asis two times. One for the filesize in bit (above) and the other for the filesize in KiB (below). ListPlot[...
  48. P

    Obtain the magnetic field from this experimental setup?

    Homework Statement Hi all, I would appreciate some help with the following problem; I need to obtain and visualize the current flow and magnetic field profile of an elliptic cylinder (made from ferromagnetic material) which has a left section set at 0 volts and a right section set at 5 volts...
  49. C

    Convergence of a hypergeometric

    The hypergeometric function, ##{}_{2}F_1(a,b,c;z)## can be written in terms of a power series in ##z## as follows, $${}_{2}F_1(a,b,c;z) = \sum_{n=0}^{\infty} \frac{(a)_n (b)_n}{(c)_n} \frac{z^n}{n!}\,\,\,\,\,\text{provided}\,\,\,\,|z|<1$$ So we may reexpress any hypergeometric function as a...
  50. A

    Symmetry of PDE

    Hello, I have a problem in the search for symmetries in pde. I would use Mathematica(c), does anyone know how to set up the code to obtain generators and then symmetries? Thanks for all.
Top