# Drawing more Complicated Graphs in Mathematica

• Mathematica
• hufflepup
In summary, you can solve a problem where the lower limit of integration depends on q in a complicated manner by using either NIntegrate or ParametricPlot to plot a graph of S[q] against L[q].
hufflepup
I have a function, S[q] which is obtained by integrating another function, A[r,q] over r.

My problem is that the lower limit of integration,
rmin depends on q in a complicated manner. Mathematica can however solve this equation to give several routes, only one of which is real which is the one I want.

I have a second function too, L[q] which is also obtained by integrating B[r,q] over r. Again the lower limit of integration depends on q in the same manner.

What I want to do is for a given value of q, solve
the equation for rmin, and use this to calculate
the corresponding L[q]. I then wish to calculate
S[q] in the same manner.

I want Mathematica to do this for many values of
q over a range and use the results to plot
S[q] against L[q]. Does anyone know an efficient
way to do this?

I am not sure I follow your plan very well, but you certainly can make a table where each entry is the solution for a given value of q.

Would it be possible to get Mathematica to plot a curved graph from a table like that if you do not know what it is supposed to look like to start with?

You can either use ParametricPlot or ListParametricPlot depending on if you want to explicitly generate the table of data points, or if you want Mathematica to handle that internally.

@hufflepup:dude i too have the same problem..
r u able to get nw?
let me know if u cn..

you can solve a problem like this as follows:

If F[q] = integral^Infinity_rmin A[r,q]dq

G[q] = integral^Infinity_rmin B[r,q] dq

where ^Infinity and _rmin represent the upper and lower limits of integration respectively, and
rmin= a(q)

Mathematica code:

F[q_]:= NIntegrate[A[r,q], {r, rmin, Infinity}]

G[q_]:=NIntegrate[B[r,q], {r, rmin, Infinity}]

The_]:= notation defines what is called a pattern, and basicly means that these expression won't be evaluated until they are called later, when a specific value of q will be provided.

As the lower limit of integration depends on rmin you now have 2 options, which is easiest will depend on your specific setup:

1) Get Mathematica to solve for rmin in terms of q, rmin=z(q), then replace rmin in the above equations with z(q).

2) Solve for q in terms of rmin, q=w(rmin) and replace the q in the integrals with w(rmin) in which case your equations would look like:

F[rmin_]:= NIntegrate[A[r,rmin], {r, rmin, Infinity}]

G[rmin_]:=NIntegrate[B[r,rmin], {r, rmin, Infinity}]

Note that these are of the form F[rmin_] not F[w(rmin)_] becuse the expression in the []
just telss Mathematica which variables will be replaced with numbers later.

To plot your graphs you then do:

graphname = ParametricPlot[{F[q], G[q]}, {q, qmin, qmax}]

OR

graphname = ParametricPlot[{F[rmin], G[rmin]}, {rmin, rminmin, rminmax}]

depending whether you went down path 1) or 2)

where qmin/rminmin and qmax/rminmax define the range of q/rmin over which you want to plot the graph.

I hope this helps you.

## What is Mathematica and how can it help with drawing complicated graphs?

Mathematica is a software program used for various scientific and mathematical computations. It has powerful graphing capabilities that allow users to create and manipulate complex graphs with ease. By using Mathematica, users can save time and effort in creating and editing graphs, as well as have access to advanced features such as 3D plotting and animation.

## What are the key features of Mathematica that make it suitable for drawing complicated graphs?

Some key features of Mathematica that make it ideal for creating complicated graphs include its ability to handle large datasets, its support for various graph types and styles, and its intuitive interface for manipulating and customizing graphs. Additionally, Mathematica has a wide range of built-in functions and algorithms that can be used to create and analyze complex graphs.

## How can I input my data into Mathematica for graphing?

There are various ways to input data into Mathematica for graphing. You can manually enter data points, import data from a file, or use built-in functions to generate data. Mathematica also has the ability to connect to external data sources such as databases or web services, making it easy to import and analyze large datasets.

## Are there any resources available for learning how to draw complicated graphs in Mathematica?

Yes, there are many resources available for learning how to use Mathematica for graphing. The official Mathematica website offers tutorials, documentation, and a user community where you can ask questions and learn from others. There are also books, online courses, and videos available that can help you master graphing in Mathematica.

## Can Mathematica handle 3D and interactive graphs?

Yes, Mathematica has advanced capabilities for creating 3D and interactive graphs. It has built-in functions for plotting surfaces, contour plots, and parametric curves in 3D. It also has tools for creating animations and interactive graphs that respond to user input. With Mathematica, you can create dynamic and visually stunning graphs that can enhance your research and presentations.

• MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
518
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
553
• MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
505
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• High Energy, Nuclear, Particle Physics
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
• Calculus
Replies
4
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
3K