Mathematica Definition and 1000 Threads

  1. Q

    Mathematica 5.0 notebook does not work in Mathematica 9.0

    1. I have managed to find the following notebook that would prove useful for me in calculating the concurrence of a 2-qubit state. http://library.wolfram.com/infocenter/MathSource/6227/ 2. The problem is that the code is for Mathematica 5.0, and try as I may, I could not make it...
  2. adjacent

    [Mathematica] Multiples of 5 from 0 to 100

    I have downloaded Mathematica to see if it is really that good. Many people use it. I want to calculate the multiples of 5 from 0 to 100. This seems pretty simple but I can't figure out a way to do it. I can't use the Modulo % in mathematica. I know that I should use Table. Is there any...
  3. Q

    Switching the position of matrix elements in Mathematica

    Say I have the following matrix, written in Mathematica A := {{a11, a12, a13, a14}, {a21, a22, a23, a24}, {a31, a32, a33, a34}, {a41, a42, a43, a44}} I want to exchange the positions of a12 and a21, a14 and a23, a32 and a41 , a34 and a43. Any ideas? Thanks.
  4. ChrisVer

    Evaluating Integral with Mathematica: A & B Cases

    Could someone please help me evaluate the integral with mathematica \int \frac{dx}{(a(1+x^{-1})+b(1+x^{2})-1)^{1/2}} For better in your code the integral must be: 1/sqrt[a(1+(1/x))+b(1+x^(2))-1] For a≤1 and for cases: A)0<b<1 B)b>1 I am sorry,but I haven't been able to receive mathematica...
  5. E

    Graphing Infinite Series (Mathematica)

    Homework Statement I just have to graph this function to see where the "Gibbs phenomenon" occurs in its Fourier Series representation. I am pretty sure I integrated correctly.Homework Equations Fourier Series The Attempt at a Solution...
  6. Q

    Defining variables in mathematica

    I need to define some "general" variables in Mathematica 8, and I wonder if this can be done the following way. Say ta[n] and tb[m] are my variables, in turn depending on n and m. I want to define a function, for example E[ta[n]_ , tb[m]_ ] := Cos[ ta[n] ] + Sin [tb[m] ] (just a simple...
  7. T

    Need Help Solving Problems in Mathematica

    How do I graph f(x)=x^5-x & g(x)=2 on the same x-y system and zoom into find the crossing points of these 2 functions? how do I find the terminal velocity(t->infinity) and find 98% of its terminal velocity? 1st step. take the derivative v=24.61(1-(0.27300^t) then I graph it. but how to...
  8. Q

    Mathematica indices as variables

    1. I'll post here a simplified version of my problem Say you have a matrix A, and you want all its components to be functions, for example: A11 = Sin(a_n) A12 = Cos(a_n) A21 = Sin(b_n) A22 = Cos(b_n) And I want to be able to do this in mathematica so as to have the matrix A a...
  9. R

    What are the unknown functions and variables in this Mathematica program?

    Hello Mr Bill, Sorry again If I distrubed you ,but i really need your help in solving my Mathematica program , I wrote the explanation of my job in the PDF in details ,may that help you to understand what Iam looking for ,and thank you again of your help.
  10. R

    Help with Mathematica Problem Solving

    Hello,I have a problem in writing my code in Mathematica, when I put values of R,T,S&a the system worked and gave me result but when I put the system in for loop , it gave me errors,I hope someone help me and thank you
  11. T

    Plotting with Mathematica or Wolframalpha

    Apologies if this is readily available, but I can't seem to find an example of it. How do I go about plotting multiple functions on the same graph? It keeps splitting my functions up into separate graphs. Nothing complicated, just something like two planes intersecting.
  12. H

    [Wolfram Mathematica] - how scripts work in Mathematica

    [Wolfram Mathematica] -- how scripts work in Mathematica Hi. This is not a homework. I just did a script in Octave and I've just finished writing it on Wolfram Mathematica. The problem is that I don't know how to define the function, I don't know how scripts work in Mathematica. My script...
  13. S

    Plotting Complex functions in Mathematica

    In a few of my books on Complex variables they show how you can look at a complex function as essentially a mapping from what plane to another. Does anyone know if there would be a way to have mathematica plot how a complex function would transform one plane into the other? Thanks for any...
  14. N

    Plot the plane x+z=0 in mathematica

    How do I plot the plane x+z=0 in mathematica on the xyz plane
  15. H

    [Wolfram Mathematica] Using Newton's method to solve non-linear system

    Hi. This is not actually not part of the homework; but it's something I'd like to do. I have to solve the following system using Newton-Raphson's method: $$\begin{matrix} \frac{X}{\mu }+Y=1 \\ X=\left( \lambda -\left( K-1 \right)X \right)Y \\ \end{matrix}$$ Surfing the...
  16. R

    Mathematica Help with Mathematica: Solve Firstresult Problem

    Hello, I want somebody help me in Mathematica My code that I wrote most of it is right ,the two first function are correct ( templet & Bisection)but the problem I faced when I wrote the function (firstresult) when I wrote in it the for loop and the if conditions the errors start to appear so...
  17. R

    How to call a built function in mathematica

    Hello,I need somebody to help me in Mathematica programm I wrote code that works as a function which I can call when I need in another function, but it did not work ,so I need help how to call my function and thanks in advance
  18. R

    How to Use FindRoot for Determinant with Fixed Values?

    Hello, I need someone to help me with mathematica my aim in the code I wrote is to find the value of "w" with fixed values of "a" and "z" which makes the determante det =0 so I need bisection method to find the value of w ,then I thought to use FindRoot function but it did not work. So how to...
  19. T

    Magnetic field from a coil (on Mathematica)

    Hello guys, I'm trying to find the configuration of two circular coils in a configuration similar to Helmholtz coils that would homogenize the magnetic field best at a volume between them. So the first thing step I took in that is use the Biot-Savart law to calculate the magnetic field...
  20. S

    Finding Non-trivial solutions to ODE in Mathematica

    For an ODE of order 2 like: X'' + λ*X = 0, how do I find the non-trivial solution in Mathematica 8? It's giving me only the trivial solution. In: ComplexExpand [DSolve[{u''[x] + \[Lambda]^2 u[x] == 0, u[0] == 0, u[a] == 0}, u[x], x]] and the out: u[x]--> 0 which is the trivial soln...
  21. moudas

    Sigularity problem in NDSolve in mathematica

    sigularity problem in "NDSolve" in mathematica Hi, I am trying to solve numerically 13 differential equations with intial boundary conditions in mathematica. In my case, the boundary conditions are not free parameters and those are constrained from experimental observations. But these set...
  22. M

    Mathematica Mathematica derivation Question

    I'm trying to work through a derivation and am getting some funny results. For example, when trying to compare some expressions, Mathematica was telling me they weren't equal, and when I worked them out by hand, I new they were equal. I then tried something like this: ExpandAll[x] ===...
  23. Sneakatone

    How to make a mathematica code with vectors and magnitude

    Homework Statement Create a mathematica code to add arbitrary number of 3 dimensional vectors. 1. n: the number of vectors which must be added 2. For each input vector, the code should accept the following: a. Length of the vector b. Three angles which the vector makes with x, y, and z...
  24. Q

    Mathematica Problem in reporting contour plot mathematica

    Dear friends I plot a Contour plot from a function with mathematica, but I don't know how can I add a small box near my figure that explain which value refer to which color? I put my code below, please help me with adding colordata to my code for having reference for colors. t = 0.01...
  25. C

    Mathematica How to Create Horizontal Filling to the Y-Axis in Mathematica?

    Filling->Axis command makes vertical lines to the x-axis. How can I make same thing for the y-axis? (Horizontal lines to the y-axis)
  26. R

    Mathematica I have a problem with mathematica

    I wrote this programm in mathematica but I had some errors that I could not solved I hope that anybody could help me For [a = 0, a <= 30, a = a + 10, For[z = 3.7, z <= 5, z = z + 0.2, For[w = 1000, w <= 20000, w = w + 1000, {m = NDSolve[{Derivative[1][y1][t] == y2[t]...
  27. Safinaz

    Mathematica - how to simplify an output formula

    Mathematica -- how to simplify an output formula Hi all, Is there any more options to simplify an out put Mathematica formula. I used //Simplify but the expression still complicated and //FullSimplify too slow and didn't work. Bests, Safinaz
  28. M

    Mathematica Using 2 color functions in a mathematica matrix plot

    I'm trying to use 2 color functions within one matrix plot in mathematica. Is this possible to do? For example, using a very simple matrix: test = Partition[Table[i, {i, 1, 9}], 3] I would like to make the even numbers vary in color increasing from white to red; and the odd numbers vary...
  29. 8

    Mathematica Mathematica, Plot Implicit function contain Sum (sigma)

    Dear friends, Over the past week, I tried to plot implicit function by mathematica but failed. I am very disappointed. Hopefully someone help me at this time. My equation is given by (see below figure): Where z0 := 6 d := 12 k := 11800 w0 := 0.025 w[z_] := sqrt[w0^2*(1 + (z/z0)^2)]...
  30. J

    Mathematica Mathematica: Trouble accurately integrating highly-nonlinear DE

    Hi, I'd like to numerically solve the IVP: x^2 y y''+2x y y'+2 y^2+xy'-x^2 y^3-(x y')^2-y=0,\quad y(x_0)=1,y'(x_0)=0 around the unit circle, x=e^{it}. When I attempt to solve it around the entire circle, I think the integration is veering of course. I believe the solution is single-valued...
  31. G

    Is mathematica wrong about this integral?

    When I type in this integral into Mathematica: $$\int_1^\infty \int_1^\infty \frac{dxdy}{(x+y^2)^2}$$ using a large number like 1020 instead of ∞, Mathematica gives me 0.785398. No matter what large number I use, Mathematica always gives me around that value. However, doing the integral by...
  32. A

    Mathematica How Can I Fix My Mathematica Animation Code for Propagator Integration?

    Hello! I need some help in Mathematica, because I'm newbie in using this program. I've a kernel for a propagator, what i want to integrate numerically by p (because the problem hasn't got analitical solution) to receive the propagator. Next i want to use that propagator for an initial...
  33. N

    Mathematica Solving trig equation Mathematica repeats results

    I am new to Mathematica and I'm not sure if I'm using it properly but sometimes the output doesn't make sense to me. I Hope someone can help me understand or correct my usage. When solving trig equations Mathematica's Solve[] function gives the correct list of solutions but some of the...
  34. M

    Mathematica Mathematica calling module from NDSolve

    Hi, I want to use a module to repeatedly calculate a parameter in NDSolve, but I seem to be having trouble. Here is a simplified version of what I'm doing. In this example, I want to use the difference between v1 and v2 at a given timepoint to calculate the connection between v1 and v2 for...
  35. stripes

    Creating the trapezoidal rule in Mathematica

    Homework Statement I am to design a small piece of code in Mathematica that takes in four parameters, a number z, the number of intervals n, the starting point, and the ending point. We are basically integrate a function of the form: f(x)=(z+1)x^{z} so we don't change the function at...
  36. stripes

    Use Mathematica and Kirchhoff's rules to find V out.

    Homework Statement Find V out by determining three equations with three unknowns. Use Mathematica to solve the system to find V out. See image for details Homework Equations -- The Attempt at a Solution Here is my code: \text{eq1}=v-i_3*(2r)-i_3*r-i_3*(2r)...
  37. stripes

    Plotting data in Mathematica certain colours depending on

    Homework Statement I have a list of data in .csv format that looks like the following: 10 5 TRUE 10.1 5.1 TRUE 10.2 5.2 FALSE 10.3 5.3 FALSE 10.4 5.4 FALSE 10.5 5.5 TRUE 10.6 5.6 TRUE ... There are thousands of entries...
  38. Hepth

    Mathematica Mathematica : Draw a simple line, make into image

    I wish to create, in Mathematica, an image. I have a set of lines, for the sake of a test, let's use: {{10,0},{40,100}} {{20,0},{80,100}} Now I want my image to be 400x100 pixels, and the lines to appear as if their coordinates are those of the points in the image. If I do...
  39. N

    Mathematica Mathematica: Recursive expression

    Hi I am trying to find a smart way to write the following fraction, $$ F = \frac{a_1}{1+\frac{a_2}{1+\frac{a_3}{1+a_4}}} $$ Here we can just take a_n= n for simplicity. My fraction is in principle infinite, but I am trying to construct a function which can find F for a given n recursively. I...
  40. P

    Mathematica Differentiating vector function [Mathematica]

    Hi. So I have this vector function which I need to differentiate, it is however very tricky to do by hand, so I'm doing it in Mathematica. \hat{u}=\left\langle\bar{u}+\bar{r}\frac{(1+\gamma)}{r(r+\bar{u}\cdot \bar{r})}\right\rangle (The brackets denote normalisation) I want to do this...
  41. alyafey22

    Mathematica Plotting Riemann Surfaces with Wolfram Mathematica 8.0

    Does anybody know how to plot the Riemann surface of complex functions on wolfram Mathematica 8.0 ?
  42. I

    Mathematica Mathematica: Solve System of Eqs & Create Table

    Hi to all! Again I have a question in mathematica. Lets us define a system of equations e.q. eqs1 =-0.17544 Csc[\[Theta]]^2 + Sin[2 \[Phi]] == 0 && 0.001447 - 0.0864 Cos[\[Theta]] + 0.0288 Cos[\[Theta]]^3 == 0; and we want to find the solution by optimization with Reduce[{eqs1 && 0 <=...
  43. P

    Mathematica [Mathematica] Simple Problem with the plot function

    I have a formula for the fibonacci sequence (with 1 being the first) and I noticed that the 12th fibonacci number was 144. I thought that was a neat coincidence, so I I headed over to mathematica to see if this (and 1) were the only numbers that had this property. I was almost certain that it...
  44. J

    Mathematica Problems with Mathematica Code for Markov Models?

    Hello! I'm writing a paper where I'm going to use markov models to evalute a device. My base for this paper is the paper written by H. Timbley. I have never used Mathematica before and thought that I would start by trying the complete code that Timbley has written in the appendix of the paper...
  45. V

    Help with loops in Mathematica (Hamiltonian)

    Homework Statement I have an assignment for my thesis to make Hamiltonian for Schrodinger equation. I won't go into physics part of it, because that is well understood. I need to somehow generate a specific matrix for Hamiltonian (H). Please see the attached file of what I need to get...
  46. N

    Calculating Triple Integrals in Mathematica

    Homework Statement Evaluate ∫∫∫\sqrt{x^{2} + y^{2}} dA where R is the region bounded by the paraboloid y=x^2+z^2 and the plane y=4 Homework Equations I believe this is a problem where cylindrical coordinates would be useful 0 ≤ z ≤ \sqrt{4-x^2} 0 ≤ r ≤ 2 ( I think this is wrong). 0 ≤ θ ≤...
  47. S

    How to Implement Kramers-Kronig in Mathematica for CSV Data?

    Homework Statement I'm trying to write Mathematica code to use Kramers-Kronig on a csv file with 2 columns. Column 1 is h(eV). It goes from 0 to 6, in increments of 0.1. Column 2 is alpha (cm^-1). In the equation below, I'm guessing column 1 is Ω. But what should I put in for ω?Homework...
  48. R

    Mathematica How do I avoid the recursion limit in Mathematica?

    I wrote code where you input a prime, P > 3, and the next prime is the output. However it involves using a recursive formula with the number of recursive steps being in the order of P and using the Mod operator. Thus P must be below 255. How can I avoid this. Follows is my code: prime = 127...
  49. J

    Mathematica Mathematica: Graphing The behavior of a double pendulum

    Hello, I have a few newb questions. How can I graph the behavior of a double pendulum in Mathematica to make strange attractors like in the Lorenz equations?
  50. F

    Mathematica Lorentz Transformation in Mathematica appears wrong.

    So, I'm trying (keyword trying) to learn a bit of special relativity on my own via the Stanford lectures on Youtube by Leonard Susskind, but I'm running into a problem. According to the lectures, for two different reference frames with co-ordinates marked (x, t) and (x', t'), the latter...
Back
Top