Drawing a picture using math equations

  • Thread starter Thread starter Matt1234
  • Start date Start date
  • Tags Tags
    Drawing Picture
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 13K views
Matt1234
Messages
141
Reaction score
0
Hello everyone,

I have an assignemnt where I have to use various transformed equations to draw a picture. I will be doing things like restricting the domain to control lengths. I was wondering if there were any computer programs that would plot equations and give me equations for lines so i didnt have to draw them by hand all the time. The functions i will be using are:

- trig functions (sine, cos tan)
- polynomial fcns
- rational functions
- exponential fcns
- log fcns


Remember the program must allow me to restrict domain PER function and graph the above fcns. If there is anything you could recommend id appreciate it, i have a college and university computer system i have access to use, so I am sure they have some of the more expensive software.

Thank you!

Also, any ideas on what to draw are welcomed! i will post it when I am all done with it. :)
 
Physics news on Phys.org
Mathematica does this easily using http://documents.wolfram.com/mathematica/functions/Boole if you don't want 0.
I believe you should be able to do similar work in Maxima using the boolean expressions.
 
Last edited by a moderator:
i heard of mathematica ill see if i can give that a try. :)
 
Ok i check the school, they have mathematica V 7.0, although it isn't very easy to learn how to use. Is there an easy way i can imput these graphs and restrict the domain and have it plot all of it on the same graph?

I learned that i will need to use the command Plot[f, {x, xmin, xmax }]

where f is the function and x min and max are the restriction on domain, but i don't see a command line to enter it in.
Thanks.
 
Edit: this works and can be edited.
Plot[2 x, {x, -5, 5}]

Now i would like to plot several functions with different domain
 
Last edited:
Matt1234 said:
Edit: this works and can be edited.
Plot[2 x, {x, -5, 5}]

Now i would like to plot several functions with different domain

Suppose you wanted to plot y = 2x with domain [0, 1] and y = 3x with domain [3, 4] on the same graph. You can use the following expression:
Code:
Plot[2 x Boole[0 <= x <= 1] + 3 x Boole[3 <= x <= 4], {x, 0, 4}]
This will plot the expression as one graph on the same plot. In order to get different colors/labels for the two expressions, you will want to use a list of plots:
Code:
Plot[{2 x Boole[0 <= x <= 1], 3 x Boole[3 <= x <= 4]}, {x, 0, 4}]
Browse through the help documentation provided with Mathematica through the help menu. It is quite extensive. Ie., if you highlight a command in the notebook and press F1, the help for that command will open in a new window.
 
Thank you for your help.

I was trying to add on more to your command.

Plot[2 x Boole[0 <= x <= 1] + Cos x Boole[-10 <= x <= 10], {x, -10, 10}]


I added on a 3rd equation which worked but the command above didnt show me the actual graph it showed me the axis but it was empty. I will be doing this with a string of about 20 equations or so, is this the best way to do it?


Also, I noticed that {x, 0, 4} restricts the size of the x axis, is there a way to do the same with the y, while plotting all these graphs?


Thanks again.
 
arithmetix said:
I run XP, and in a few seconds I was just now able to download Graph 4.3 from http://www.padowan.dk/graph/Download.php. It is very easy to use and will be great for your job.

Perfect! I could not thank you enough, this will do everything i need in an easy manner.