Ask Your Question

# Beginner: Plot sin 2x or 4cos 2x

Disclaimer: I'm a beginner with Sage.

I'm working with transformations and translations of trig functions, and although I can "plot(sin, (-2,2))" without trouble, how do I plot the following?

sin 2x


or

4cos 2x


or

3sin (x+5) -3


Thanks!

edit retag close merge delete

## 2 Answers

Sort by ยป oldest newest most voted

1) have a look at the documentation, for example:

or my plotting tutorial (in German) http://85.214.246.147:8080/home/pub/8/

2)

plot(sin(2*x),-pi,pi)

more

## Comments

excellent! thank you!

( 2015-07-10 21:13:17 +0200 )edit

Hope you are enjoying Sage so far.

A good place to check for things is the sage documentation.

For example, here are some examples which might be relevant for you. The following modification might give you a hint about how to proceed.

h(x) = sin(4*x)
plot(h,(-2*pi,2*pi),color='orange')


Output:

Here is another reference which might be useful.

more

## Comments

Perfect! Thank you for the detail. I was trying sin(2x) not sin(2*x) and getting an error.

( 2015-07-10 21:14:28 +0200 )edit

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2015-07-10 14:08:32 +0200

Seen: 680 times

Last updated: Jul 10 '15