Equation Graphing Difficulties

In summary, the conversation discusses a decaying trig function that is difficult to graph. The original expression contains many superfluous parentheses and can be simplified to a form that Wolfram can graph. Mathematica 9 may be able to plot the function, and the conversation provides an example of how it can be done. The conversation also includes tips for using Mathematica and WolframAlpha to plot the function accurately.
  • #1
kyledixon
3
0
Hi everybody,

I am having some difficulties graphing this decaying trig function:

((e^(((.175(1-(y/10))+((y/10)-.001))t)/(2000)))(10cos((sqrt(((.175(1-(y/10))+((y/10)-.001))^(2))-400000000))t)+10sin((sqrt(((.175(1-(y/10))+((y/10)-.001))^(2))-400000000))t))

I have checked over the parentheses three times now, and I don't see any errors there. I am assuming I am just timing out the graphing programs, because WolframAlpha is having difficulty, and I don't know how else I can graph this. So does anybody know how I can graph this? Or do you see any errors I have made?
 
Mathematics news on Phys.org
  • #2
Is this your function?

##\displaystyle \exp\left(at/2000\right) \cdot \left( 10 \cos \left( t \cdot \sqrt{a^2 - 400000000} \right) + 10 \sin \left( t \cdot \sqrt{a^2 - 400000000} \right) \right)##

where

##a = 0.175 (1-y/10)+(y/10-0.001)##

Your original expression had many superfluous parentheses in it. For example, 1-(y/10) and ^(2). Also, I noticed that Wolfram didn't know how to recognize ()t, once I inputted several * into the expression a result was shown (indicating errors in parentheses). There was one error near the end, that I fixed when rewriting the expression but I don't know what parens it was. Here is what I can use for Wolfram:

exp(t*(0.175*(1-y/10)+(y/10-0.001))/2000)*(10*cos(t*sqrt((0.175*(1-y/10)+(y/10-0.001))^2-400000000))+10*sin(t*sqrt((0.175*(1-y/10)+(y/10-0.001))^2-400000000)))

No graph shows up however.
 
  • #3
Yes! You nailed the equation exactly. Sorry about the extra parentheses, I became used to adding things like ^(2) after I kept getting inaccurate answers because Wolfram misunderstood what I meant. I can't thank you enough for fixing the equation. Do you think Mathematica 9 would plot it? If so, would you know how to input it appropriately?
 
  • #4
You can actually simplify the expression down further. Using the fact that ##\sin(x) + \cos(x) = \sqrt{2} \sin(x + \pi/4)##, the expression can be rewritten as

##\displaystyle 10\sqrt{2} \cdot \exp\left(at/2000\right) \cdot \sin \left( t \cdot \sqrt{a^2 - 400000000} + \pi/4 \right)##

where a is as defined previously. The sin term is too complex for Wolfram to graph, but you can try it with Mathematica and see if the extra time allowed can plot it. (Wolfram basic only allows so much computation time)

10*sqrt(2)*e^(a*t/2000)*sin(t*sqrt(a^2-400000000+pi/4))
 
  • #5
I gotcha. Thanks so much for your help, now I just need to learn how to use Mathematica and hopefully I will be good to go!
 
  • #6
kyledixon said:
Do you think Mathematica 9 would plot it? If so, would you know how to input it appropriately?

Code:
In[1]:= a = 0.175*(1 - y/10) + (y/10 - 0.001);
    expr = 10*Sqrt[2]*Exp[a*t/2000]*Sin[t*Sqrt[a^2 - 4*10^8] + Pi/4];
    Plot3D[{Re[expr], Im[expr]}, {t, -10^-4, 10^-4}, {y, -10, 10}]

Out[3]= ...PlotSnipped...

expr is HUGE for values of t much bigger than +/- 10^-4. Try
Code:
Table[expr, {t, -20, 20, 5}, {y, -1, 1}]
to see what I mean.
expr is Complex for many or most values of t.
The plot is almost unchanged by the range of y until y is beyond +/-10^5.
Overlaying two plots, one the Real part and the other the Imaginary part,
and suitably restricting the Plot range let's you see a plot.
Mathematica is fanatic about correct capitalization and () versus [] versus {} while WolframAlpha doesn't care.
Mathematica allows you to define functions and assign values to variables while WolframAlpha doesn't.
Be very very careful to verify that any plot which includes numbers like 400000000 is correct because Plot is not perfect and with wildly large or wildly small numbers it can often show you something that is misleading or simply wrong, increase the range of t in that plot by 10x or 100x and look at the result to see examples of this.
Getting a graph to be exactly the way you want it to be can take ten times as long as it takes to get the math to be really correct.

You can get WolframAlpha to plot the Real or Imaginary part, but the line of code is so long that it barely fits within the limits.

http://www.wolframalpha.com/input/?i=Plot3D%5B%7BRe%5B10*Sqrt%5B2%5D*Exp%5Bt*%280.175*%281-y%2F10%29%2B%28y%2F10-0.001%29%29%2F2000%5D*Sin%5Bt*Sqrt%5B%280.175*%281-y%2F10%29%2B%28y%2F10-0.001%29%29%5E2-4*10%5E8%5D%2BPi%2F4%5D%5D%7D%2C%7Bt%2C-10%5E-4%2C10%5E-4%7D%2C%7By%2C-10%2C10%7D%5D

Change the Re to I am at the beginning of that line to see the Imaginary plot.
Hopefully I haven't broken any of this with copy and paste.
Test all this very carefully before you depend on any of it.
 
Last edited:

What is equation graphing and why is it important?

Equation graphing is the process of visually representing mathematical equations on a graph. It is important because it allows us to better understand and analyze mathematical relationships and patterns.

What are some common difficulties in equation graphing?

Some common difficulties in equation graphing include understanding the relationship between the variables, determining the appropriate scale for the graph, and accurately plotting points.

How can I improve my equation graphing skills?

Practicing regularly, seeking help from a tutor or teacher, and utilizing online resources and graphing tools can all help improve equation graphing skills.

What are some tips for graphing difficult equations?

Some tips for graphing difficult equations include breaking them down into smaller parts, choosing appropriate intervals for the x and y axes, and double-checking calculations and plotting points.

Are there any common mistakes to avoid when graphing equations?

Yes, some common mistakes to avoid when graphing equations include forgetting to label the axes, incorrectly scaling the axes, and misinterpreting the slope of the graph.

Similar threads

Replies
5
Views
950
  • General Math
Replies
1
Views
723
Replies
1
Views
828
  • General Math
Replies
2
Views
721
Replies
8
Views
929
Replies
5
Views
1K
  • General Math
Replies
3
Views
1K
Replies
3
Views
1K
  • General Math
Replies
3
Views
2K
Replies
4
Views
3K
Back
Top