Mathematica Definition and 1000 Threads

  1. 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...
  2. 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...
  3. 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)...
  4. 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...
  5. 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...
  6. ChristinaJ

    Mathematica Mathematica: Duplex Printing from button inside DialogNotebook on Mac

    All, I have the following code which generates a window containing the variable PrintOut and a Print button. When the print button is pressed the contents of the window are sent to the printer and simultaneously a pdf is generated. PrintOut = "Some stuff - plots, tables etc."...
  7. 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...
  8. 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...
  9. 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 ?
  10. 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 <=...
  11. 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...
  12. 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...
  13. 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...
  14. 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 ≤ θ ≤...
  15. Hepth

    Mathematica Mathematica : Integrate bug? Generate conditions.

    Please try: Integrate[((x - 1)^2/x) (1 - y), {y, 0, 1}, {x, 0, 1}] Integrate[((x - 1)^2/x) (1 - y), {x, 0, 1}, {y, 0, 1}] on your version. My Options[Integrate] GenerateConditions-> Automatic. In the first case, it gives -3/4, the second is divergent. For some reason when the...
  16. 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...
  17. 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...
  18. 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?
  19. 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...
  20. R

    Mathematica How to integrate in Mathematica SIMPLY

    Every time I try to do a simple definite integral simbolically such as: Integrate[R/P - c1/(T^2), {P,P1,P2}] it takes about 2 minutes then gives a long conditional expression. Basically it assumes that P1 and P2 are general numbers with complex parts and negative and such. HOW do I tell...
  21. L

    Mathematica Mathematica: Solving system of three equations

    Hello, I am new to mathematica, and I am having trouble using the solve/nsolve to solve my system of three equations. Attached is my code so far. Any help would be greatly appreciated. It gets stuck in the loop section of the code. I have also pasted the code below. Thanks! Alicia...
  22. S

    Mathematica Mathematica: Make a 3D List from two 1D lists and a tables

    I am dealing with a set of data where I have values C(x,t) for a discrete set of x and t values. Say: x={1,5} t={1,3,7} C={{C(1,1),C(1,3),C(1,7)},{C(5,1),C(5,3),C(5,7)}}. How do I combine this to a list that looks like...
  23. Z

    Integral Substitutions and Mathematica

    Hi all. My professor gave us some integrals that Mathematica can't do, and we have to teach Mathematica how to do them. I got the first two, but I'm stuck with the u substitutions for these six. I know that I am supposed to make an attempt at a solution, but I've tried several different u...
  24. S

    Mathematica Mathematica to FindFit for multiple data set

    After conducting my experimental work I will have a number of sets of data. It is easy to use Mathematica to find a fit of just one set, but I would like to fit all sets at once as they are too many to do them all ate once. They will all be fitted by the same function say y=ax+b, every set...
  25. A

    Mathematica Mathematica to recognize e−iθ as the eulers identity

    I just need to know how can Mathematica recognize e^{-i\theta} as the eulers identity. This is, e^{-i\theta} = cos \theta + sin \theta . When i plot a function like e^{i\theta}, nothings appear in the graph. Help is appreciated.
  26. R

    Mathematica Mathematica or (preferably) maxima display exanded form

    Is it possible to get either one to display the less factored form of an expression? what I am doing is multiplying matrices together for geometrical optics but my answers keep coming out really ugly. For example I have d-d\left(\frac{2d}{r}-1\right) I don't think a person would ever write...
  27. N

    How to calculate curvature of a vector in Mathematica.

    Homework Statement r(t)={(4+cos20t) cost,+(4+cos20t) sint,+0.4sin20t} Calculate the curvature of r[t] for 0≤t≤4pi Homework Equations k = | r' x r'' | / | r' |^3 The Attempt at a Solution r[t_]:={4+Cos[20t]*Cos[t],4+Cos[20t]*Sin[t],0.4Sin[20t]} k[t_]:=Norm[Cross[r',r'']]/Norm[r']^3...
  28. I

    Mathematica How can I write a Mathematica function that handles different argument types?

    Hello all, It's quite a mouthful but I need help writing a function that will behave as follows: 1.if called with an argument which is an integer, it will return the absolute value of the input 2. if called with a real argument, it will return the number rounded to the nearest...
  29. H

    Mathematica Mathematica: output an expression without evaluating it first

    Greetings, I recently discovered Mathematica's Format function, and it has been of great use to me. However, there is one thing that I want to use it to do, that I have yet to be able to. I could do this easily, though, if there is some Mathematica function that works as follows... If I put a...
  30. F

    Mathematica Plotting functions and coordinates, Mathematica

    Hi all. Is there a way to plot both functions and coordinates/points on the same graph in Mathematica? The various functions for plotting each seem very incompatible. I would like to compare a probability function to Monte-Carlo-method simulation results. Also, out of curiosity, do...
  31. I

    Mathematica Mathematica - using rules to assign integration limits

    I'm trying to find the integration of my function f[x] from 1 to 4 using the indefinite integral and inserting limits using rules. I am not sure how to insert the limits with rules, have been playing about with the following Integrate[f[x], x] /. x -> {1 >= x <= 4} which ain't working, any...
  32. E

    MATLAB Matlab vs Mathematica for DiffEqs: Accuracy?

    I wonder which one is more accurate when solving differential equations?
  33. Fredrik

    Mathematica Simplify in Mathematica: Reals & k > 0

    Why do I keep getting output that looks like this when I use Mathematica? $$\frac{2 b k |a+b v| (2 a+b v+b v \cos (t)) \sin ^2\left(\frac{t}{2}\right)}{(a+b v)^2 \sqrt{\left(\frac{1}{\sqrt{4 a^2 k^2 \sin ^4\left(\frac{t}{2}\right)+d^2 (a+b v)^2 \sin ^2(t)}}\right)^* \sqrt{4 a^2 k^2 \sin...
  34. D

    Mathematica Data from 2nd order ode mathematica

    How can I extract time data from a system 2nd order ODEs in Mathematica?
  35. D

    Mathematica How to Find Velocity at Final Location Using Mathematica?

    I used mathematica to solve a restricted 3 body problem and was able to export my position data at different time intervals. How can I find my velocity at that final location?
  36. D

    Mathematica Troubleshooting Mathematica: Identifying Strange Behavior & Solutions

    Can someone identity what the issue here is before I throw my computer out the window. By the way, this just worked 10mins ago. I restarted Mathematica and my computer but it now insist z isn't an equation. ClearAll["Global`*"]; me = 5.974*10^(24); mm = 7.348*10^(22); G = 6.67259*10^(-20)...
  37. Hepth

    Mathematica Mathematica : Numerically Integrate function with undefined variables?

    I have a LARGE function that I must integrate over 2 variables, {x,y} both from 0 to 1. The Function looks like : F[x_,y_] = A[q] G[x,y] + B[q] G2[x,y] + (...) Where (...) MAY be 100's of terms long, if not thousands. But the fact is each term is separable, in SOME way to a function of...
  38. M

    Magnetic Pendulum Fractal Basin Boundaries in Mathematica

    Homework Statement Hey all, this is for a laboratory. I need to determine the fractal basin boundaries for a magnetic pendulum swinging chaotically about 3 other magnets underneath. I was able to plot a single path for the pendulum in Mathematica, but now I need to expand my code to...
  39. B

    Mathematica Symbolic vector differentiation with Mathematica

    Hi, I am a new user of Mathematica (although I am reasonably familiar with MATLAB) and I am trying to differentiate a scalar wrt a vector Mathematica. ie, I want to check if \begin{equation} \phi = \textit{x}^{T} \textbf{A} \textit{y} \quad \mbox{where $\textit{x}$, $\textit{y}$ are vectors...
  40. L

    Analytical Bra-Ket Tensor Products: Rules & Wolfram Mathematica

    What are the rules of analytical – not numerical (matrix) entry of bra-ket convertion – operations on bra-ket, in particular – tensor product ? For example – how in analytical form to do this: U|\Psi\rangle where: U=I\otimesI I=|0\rangle\langle0|+|1\rangle\langle1|...
  41. S

    Mathematica Optimize Your Mathematica Code with These Helpful Tips and Tricks

    First of all, this might give seasoned Mathematica users some serious eye sores cause I'm a newb at this xD f[x_] := (1^-9) (Exp[38.629 x] - 1); data = Table[if[[f[x], {x, -5, 5, 0.01}] > 0.005, 0.005, f[x]]]; ListPlot [data, DataRange -> {-5, 5}, Joined -> True, PlotRange -> {0, 0.01}...
  42. E

    Mathematica NDSolve differences between mathematica 8 and 9

    Hello, I am using mathematica 9 and having some problems with a particular expression, but when I tried it on mathematica 8 it worked perfectly. My expression is: NDSolve[{D[T[n,z], n]+i 2 D[T[n,z], {z,2}]+z^2 T[n,z]==0, T[0,z]==1, Derivative[0,1][T][n,5]==0, Derivative[0,1][T][n,0]==0}, T...
  43. J

    Simple Matrices proof using Mathematica help

    Simple Matrices proof using Mathematica help! Homework Statement Hey guys, I'm trying to prove that (AB)-1 = B-1 A-1 and also the one that looks the same but is with transpose of the matrices making A and B arbitrary 3x3 matrices. I made A = {{a_1,a_2,a_3}...} B =...
  44. A

    Mathematica Trouble: Solving for x in Sinc[x] > (1/1.01)

    If anyone on here uses Mathematica maybe you could help me with an issue I am having with computing the following: Solving for x in: Sinc[x] > (1/1.01) I am looking only at the positive values and not making any headway with the Solve or NSolve commands. I should also mention that this...
  45. L

    Using Mathematica to plot and fit data

    Homework Statement Hello. My problem is that I need to learn how to use computer software this semester. My teacher said, go and figure out how to use any computer software you like to make graphs. I have Mathematica but I am not proficient in using it, could somebody please help me with...
  46. 0

    Mathematica Reduced navier stokes in mathematica help please

    reduced navier stokes in mathematica urgent help please ok I am modelling airflow in the upper airway for application i obstructive sleep apnoea, but I have hit a brick wall with mathematica. I have a system of 3 differential equations with boundary conditions, and I need to solve to find 3...
  47. binbagsss

    Mathematica Is Mathematica able to solve expressions such as

    (c (qz + (-1 + q) (-1 + (1 + qz)^0.5)))/(h q^2 (1 + z)^2) = d, And to solve for q New to the programme, thanks a lot !
  48. D

    Mathematica Solving Mathematica Summation Code Problem

    Can anyone tell me what is the problem with this Mathematica code? Nmax = 10; Mmax = 10; A = 4/Pi^2*Integrate[x*Sin[n*x]*Sin[m*y], {x, 0, Pi}, {y, 0, Pi}]; B = 4/Pi^2*Integrate[Sin[n*x]*Sin[m*y], {x, 0, Pi}, {y, 0, Pi}]; u[x_, y_, t_] = Sum[Sin[n*x]* Sin[m*y] (A*Cos[(n^2 + m^2)*t] +...
  49. StevieTNZ

    Mathematica How Can I Edit Inputs in a Mathematica .nb File for Different Calculations?

    Hi there I was sent a .nb file with calculations already done for me, for various inputs. I was wondering how I can edit those inputs, keeping the rest of the calculations the same, to find out what the result would be? (see attached file for example)
  50. H

    Questions about Getting Mathematica for Differential Equations

    Hi I decided to purchase mathematica, however it appears this is a much more complicated affair than I had imagined. I will mainly be using it for differential equations (nonlinear, nonhomogenous and coupled, what have you) to help with physics. Could someone clear up some questions I have...
Back
Top