Controls
Which function
Axis units
Readings
- Equation
- y = 2 sin(2x + 60°) + 1
- Amplitude |A|
- 2
- Period
- 180°
- Phase shift (−C/B)
- -30°
- Vertical shift
- 1
- Range
- [-1, 3]
- Maximum
- 3
- Minimum
- -1
- Point x
- -360°
- Point y
- 2.73
How to use this simulation
- Pick sine, cosine or tangent under "Which function". The faint grey dashed curve is the parent function and the bold curve is your transformed graph.
- Drag the amplitude factor A: the wave grows or shrinks, and a negative A flips it upside down. Compare the Amplitude |A| reading as you go.
- Raise the frequency factor B to squeeze the wave. The bracket under the graph always spans exactly one period.
- Use the phase C to slide the wave sideways and the vertical shift D to lift the midline. The green point rides along the curve; press play or pause as you like.
- Switch to tangent and look at the red dashed vertical lines: those are the asymptotes, where tan is undefined. Flip the axis units between degrees and multiples of π.
Waves everywhere: why we graph sin, cos and tan
Drop a pebble in a pond and the surface rises and falls. A guitar string, the tide at the coast, the current in your wall socket, even the height of a seat on a Ferris wheel: all of them repeat themselves after a fixed time. Sine and cosine graphs are the simplest tool mathematics has for describing that repetition.
Plain sin x is not enough, though. Real waves can be taller, faster, late to start or sitting higher than zero. So we change the basic wave in four ways: stretch it, squeeze it, slide it sideways and lift it up. In this lesson you do all four with your own hands.
From the unit circle to the wave
A point travels round the unit circle. At angle θ its height is sin θ and its left-right position is cos θ. Now keep that height and lay it out to the right as the angle grows. A smooth wave appears: that is the graph of y = sin x. For cos x, lay out the left-right position instead.
Both graphs repeat every 360°, so the basic period of sin and cos is 360° (2π in radians). The greatest value is 1 and the least is -1. Sine starts at zero and climbs; cosine starts at its peak, which means cos x is just sin x moved 90° to the left.
Tangent is tan x = sin x ÷ cos x. Wherever cos x = 0 (at 90°, 270° and so on) the division fails, tan is undefined, and the graph shoots off to infinity beside that line. Such a vertical line is called an asymptote. The period of tan is only 180°.
The master formula: y = A·f(Bx + C) + D
Every sine, cosine or tangent graph you will meet fits one mould. f is sin, cos or tan, and four numbers A, B, C, D describe the wave. Here is each job in one line; we take them one at a time below.
y = A·f(Bx + C) + Dgeneral form, f is sin, cos or tan
amplitude = |A|how far the wave rises above its midline (sin, cos)
period = 360°/|B| = 2π/|B|for sin and cos
period = 180°/|B| = π/|B|for tan
phase shift = −C/Bpositive means right, negative means left
range = [D − |A|, D + |A|]the values sin and cos graphs can take
The vocabulary in plain words
These words come up again and again in exams. The table gives each meaning and its value for the graph the simulation opens with.
| Word | Meaning | For the starting graph (y = 2 sin(2x + 60°) + 1) |
|---|---|---|
| Amplitude | Distance from the midline to the top of a peak | 2 |
| Period | How much x must grow for the wave to complete one cycle | 180° (π) |
| Phase shift | How far the start of a cycle has slid right or left | -30° |
| Midline | The horizontal line y = D through the middle of the wave | y = 1 |
| Range | All the y-values the graph reaches | [-1, 3] |
| Asymptote | A line the graph keeps approaching but never touches | tan only |
A: amplitude, and what a flip does
Changing A only changes the height of the wave, never how crowded it is. For y = 3 sin x the wave rises to 3, and the distance from midline to peak is 3. That distance is the amplitude.
If A is negative the wave is flipped over its midline. y = −3 sin x and y = 3 sin x have the same amplitude, 3; one has a peak exactly where the other has a trough. So amplitude is always positive: |A|.
B: period, or how squeezed the wave is
B squeezes the wave sideways. With B = 2 the wave runs twice as fast, so one full wave takes 180° (π) instead of 360°. The rule is: period = basic period ÷ |B|.
A B between 0 and 1 does the opposite and stretches the wave out. The period of y = sin(x/2) is 720°.
B = 2 ⇒ half the periodthe wave gets crowded
B = 0.5 ⇒ double the periodthe wave spreads out
C: phase shift, the sideways slide
A new cycle starts when Bx + C = 0, so the start is at x = −C/B. In the starting graph y = 2 sin(2x + 60°) + 1 that gives −C/B = -30°: the wave has slid 30° to the left of where the plain sine starts.
Do not forget B. Many students see C = 60° and say the graph moved 60°. Because B = 2, the shift is half of that, -30°. Instead of memorizing, factor the bracket: 2(x + 30°) = 2x + 60°.
D: vertical shift and the midline
D lifts or lowers the whole wave without changing its shape. The midline becomes y = D. In the starting graph the midline is y = 1 and the amplitude is 2, so y runs from -1 up to 3.
The rule: maximum = D + |A| and minimum = D − |A|. Turned around, amplitude = (maximum − minimum) ÷ 2 and D = (maximum + minimum) ÷ 2, which the solved problems use.
Tangent is the odd one out
The tan graph climbs to infinity and drops from minus infinity again and again, so it has no maximum, no minimum and no amplitude. Its range is all real numbers. A only decides how steep the curve is. The phase shift −C/B and the period 180°/|B| work in the same way as before.
The graph of y = 3 tan 2x − 1 has asymptotes at x = -45° and x = 45°, then every 90°. Choose tan in the simulation and you will see exactly these red dashed lines, and when the green point gets close to one the reading says "undefined".
Sin, cos and tan graphs at a glance
Knowing the three parent graphs makes any transformed graph easy to read.
| Property | sin x | cos x | tan x |
|---|---|---|---|
| Period | 360° (2π) | 360° (2π) | 180° (π) |
| Range | [-1, 1] | [-1, 1] | all real numbers |
| Value at x = 0 | 0 | 1 | 0 |
| Maximum | 1 | 1 | none |
| Asymptotes | none | none | x = 90° + 180°k |
| Symmetry | odd, about the origin | even, about the y-axis | odd, about the origin |
Experiments to run in the simulation
Changing things yourself makes the formulas stick. Try these one by one, and predict before you drag.
- Keep the starting y = 2 sin(2x + 60°) + 1 and read y at x = 0: it is 2.73, which is 2 sin(60°) + 1.
- Raise only B from 1 to 4 and count how many waves fit on the screen; match the count to the Period reading.
- Set A = −2 and watch the wave flip, but notice the Amplitude reading does not go negative.
- Make C positive, then negative, and note which way the dot on the bracket moves each time.
- Set D = 3 and check the Maximum and Minimum readings against D ± |A|.
- Choose cos and set C = 90°. Do you get the graph of a sine?
- On tan, raise B and count the asymptotes: the larger B is, the closer together they sit.
- Switch the axis units to multiples of π and write the period as a multiple of π.
Solved problems
In each one, spot A, B, C, D first and then use the four rules. You can type the same numbers into the simulation to check.
Problem 1: amplitude and period of y = 3 sin(2x + 0°) + 0
Here A = 3, B = 2, and C and D are zero. Amplitude = |3| = 3. Period = 360° ÷ 2 = 180°. Phase shift is 0 and the range is [-3, 3].
Problem 2: the phase shift of y = 2 cos(3x − 90°) + 0
A = 2, B = 3, C = -90°. Phase shift = −C/B = −(-90°) ÷ 3 = 30°, to the right. Period = 360° ÷ 3 = 120°. So the first peak of this cosine is at x = 30°.
Problem 3: the range of y = -2 sin(0.5x + 45°) + 1
A is negative, but the amplitude is |A| = 2. B = 0.5, so the period is 360° ÷ 0.5 = 720°. Phase shift = −45° ÷ 0.5 = -90°. Range = [1 − 2, 1 + 2] = [-1, 3].
Check: at x = 0, y = -2 sin(45°) + 1 ≈ -0.41, which lies inside that range.
Problem 4: period and asymptotes of y = 3 tan(2x + 0°) − 1
The period of tan is 180° ÷ 2 = 90°. Asymptotes occur where 2x = 90° + 180°k, so x = -45°, 45° and every 90° after that. The range is all real numbers because tan has no maximum or minimum.
Problem 5: find the equation with maximum 5, minimum -1, period 120°
Amplitude A = (5 − (-1)) ÷ 2 = 3. D = (5 + (-1)) ÷ 2 = 2. B = 360° ÷ 120° = 3.
So one answer is y = 3 sin(3x) + 2. (With C = 0 the sine starts on the midline; other values of C also work.)
Problem 6: the tide, h = 5 + 2 cos(30t)
Here t is in hours and the angle in degrees. Period = 360° ÷ 30 = 12 hours. The water is highest at 7 m and lowest at 3 m. After 3 hours h = 5.00 m.
Problem 7: peak of 220 V, 50 Hz mains power
Peak voltage = 220 × √2 ≈ 311.1 V, because 220 V is the effective value. Period = 1 ÷ 50 = 0.02 s (20 ms). So V = 311.1 sin(18,000t) has amplitude 311.1.
Common mistakes
These slips cost marks. Skim the list before an exam.
- Taking the phase shift to be C. It is −C/B, because the start of a cycle comes from Bx + C = 0.
- Writing a negative amplitude when A is negative. Amplitude is a distance, so it is |A|.
- Multiplying the period by B instead of dividing; a bigger B makes the period smaller.
- Giving tan a period of 360° or 2π. It is 180° or π.
- Hunting for a maximum and minimum of tan; there are none.
- Mixing degrees and radians. If you work in multiples of π, keep everything in radians.
Where you meet these graphs in real life
Sound: a pure musical note is a sine wave of pressure. A larger amplitude is a louder note and a larger frequency factor B is a higher pitch.
Electricity: the alternating current from your wall socket follows a sine wave, as in Problem 7.
Tides and seasons: sea level and the length of the day rise and fall through the year like a cosine.
Wheels and pendulums: the height of a marked point on a turning wheel traces a sine graph against time.
Engineering and signals: pictures, music and wifi are broken into sums of sine waves to be stored and sent.
Exam corner
In CBSE class 11, the chapter on trigonometric functions asks you to draw and read the graphs of sin, cos and tan and to state their domain, range and period. In the later chapters on calculus the same graphs return, so it pays to know them cold.
When you see a question, first write the equation in the form y = A·f(Bx + C) + D and pull out the four numbers. Then apply the four rules for amplitude, period, shift and range. If you must sketch, mark the midline, one peak, one trough and the start of a cycle before drawing the smooth curve.
Quick revision
These few lines are enough for the night before the exam.
- A: amplitude |A|; a negative A flips the graph.
- B: period = basic period ÷ |B|.
- C: the wave moves by −C/B, positive to the right.
- D: midline y = D; range [D − |A|, D + |A|].
- tan: period π or 180°, has asymptotes, range is all real numbers.
Frequently asked questions
What is the basic period of sin x, cos x and tan x?
360° (2π) for sin x and cos x, and 180° (π) for tan x. When B is present, divide that period by |B|.
What is amplitude?
Amplitude is the distance from the midline of a wave to its highest point. In y = A sin(Bx + C) + D it equals |A|.
How do I find the phase shift?
Set Bx + C = 0 and solve to get x = −C/B. A positive value means the wave moved right, a negative one means left. For y = 2 sin(2x + 60°) + 1 the phase shift is -30°.
What is the range of y = A sin(Bx + C) + D?
[D − |A|, D + |A|]. For the starting graph y = 2 sin(2x + 60°) + 1 the range is [-1, 3].
Why does the graph of tan x have asymptotes?
tan x = sin x ÷ cos x, and when cos x is zero (at 90°, 270° and so on) the division is impossible. The graph runs off to infinity there, which makes a vertical asymptote.
How are the graphs of cos x and sin x related?
They have the same wave shape. Moving the cos graph 90° to the right gives the sin graph. Cosine starts at a peak, sine starts on the midline.
What does a negative A do to the graph?
It flips the wave over its midline, but the amplitude stays the same because amplitude is |A|.
Keep studying this topic
The animation made the idea click; now turn it into marks. Syllabus, suggestions, textbooks and admission-test guides are below.
SSC
SSC Higher Mathematics: syllabus and preparation
HSC
HSC Higher Mathematics: syllabus and preparation
Textbook
Class 9-10 Higher Mathematics textbook
Admission
Engineering admission test preparation
SSC
SSC Mathematics: syllabus and preparation
Textbook
Class 9-10 Mathematics textbook
Admission
Jahangirnagar University mathematical and physical sciences unit
English
Paragraph: Artificial Intelligence
Bangla
রচনা: কৃত্রিম বুদ্ধিমত্তা (in Bangla)
SSC
SSC suggestions
HSC
HSC suggestions
Admission
University admission guide
SSC
SSC syllabus
HSC
HSC syllabus
Test prep
GRE Quantitative Reasoning guide
Test prep
Digital SAT Math guide
Scholarship
Scholarships to study abroad
Tool
Compound interest calculator
Career
Data scientist resume example
Career
Cover letter examples
More math animations
Grade 8–10
Pythagorean Theorem
The Pythagorean theorem explained: formula a² + b² = c², two proofs you can watch, the converse, Pythagorean triples and 10 worked examples. Drag the triangle yourself.
Grade 10–11
Trigonometric Ratios and the Unit Circle
Drag a point round the unit circle and watch sin, cos and tan change. Standard angle table, ASTC signs, identities, radians and graphs, with solved examples.
Grade 9–11
Quadratic functions and their graphs
Drag the vertex and change a, b, c to see how a quadratic function graph moves. Learn factoring, completing the square, the quadratic formula and discriminant.
Grade 9–10
Circle theorems
All the circle theorems with drag-and-check diagrams: angle at the centre, same segment, semicircle, cyclic quadrilateral, chords, tangents and alternate segment.
Grade 9–10
Heights and distances: elevation and depression angles
What angle of elevation and angle of depression mean, how the height-and-distance formula works, and how two observations solve a tower's height without ever measuring it — with an interactive simulation and solved problems.
Grade 9–11
Probability: experimental vs theoretical probability
What probability means, how the sample-space formula P(E) = n(E)/n(S) works, and why experimental frequency edges closer to theoretical probability the more you flip, roll or draw — with a coin, dice and coloured-ball simulator.
Grade 10–11
Arithmetic and Geometric Sequences
Learn the arithmetic and geometric sequence formulas for the nth term and sum, Gauss's pairing trick, and the sum-to-infinity formula a/(1−r), with a drag-and-slide bar-chart simulation and worked examples.
Grade 9–10
Mean, Median and Mode
Learn the mean, median and mode formulas, why the median resists an outlier while the mean does not, and the grouped-data median/mode formulas, by dragging points on a number line, with worked examples.
Grade 7–11
Sets and Venn Diagrams
Shade union, intersection, difference and complement on a live Venn diagram, drop numbers into regions, check n(A ∪ B) and test De Morgan’s laws, with solved problems.
Grade 8–10
Linear equations: graphs, slope and simultaneous pairs
See slope, intercepts and angle on a straight line, then graph two linear equations to find where they meet. Learn the ratio test for one, none or infinite solutions.
Grade 9–10
Completing the Square and the Quadratic Formula
Watch algebra tiles complete the square, then solve quadratic equations, find the vertex and see why the formula works. Free interactive simulation with solved examples.
Grade 7–10
Area of a Circle: Proof, Formula and Solved Problems
Cut a circle into slices, slide them into a rectangle and watch the area become πr². Free interactive simulation with circumference, pi, sectors, arcs and solved problems.
Grade 8–10
Volume and Surface Area of Solids: Cube, Cuboid, Cylinder, Cone, Sphere
Rotate six solids in 3D, unfold their nets and pour a cone into a cylinder to see why it takes exactly three. Free simulation with volume, CSA and TSA formulas and solved problems.
Grade 8–10
Similar Triangles: Scale Factor, AA, SSS, SAS and Shadow Heights
Scale a triangle with a slider and watch angles stay equal, side ratios stay k and area grow by k². Free interactive similar triangles simulation with AA, SSS, SAS tests and shadow problems.
Grade 9–11
Coordinate Geometry: Distance, Midpoint, Slope, Section Formula and Locus
Drag points on a grid and watch the distance formula, midpoint, slope and section formula update live. Free coordinate geometry simulation with the perpendicular-bisector locus and solved problems.
Grade 11–12
Conic Sections: Circle, Ellipse, Parabola and Hyperbola
Tilt a plane through a double cone and watch a circle, ellipse, parabola or hyperbola appear, with its standard equation, foci and eccentricity. Free conic sections simulation with solved problems.
Grade 9–11
Function Transformations: Shifts, Stretches and Reflections
Pick x², |x|, √x, sin x or 2^x and drag sliders for a, b, h and k. Watch shifts, stretches, squeezes and reflections move the graph, with the parent faded behind. Free simulation with solved problems.
Grade 11–12
Derivative as the Slope of a Tangent: Secant to Tangent
Drag a point P on x², x³, sin x, eˣ or 1/x and shrink the gap h to zero. Watch the secant become the tangent and its slope become the derivative, with the derivative graph below. Free simulation.
Grade 11–12
Riemann Sums and Integration: Area Under a Curve
Cut the area under x², x³, sin x, eˣ or √x into up to 100 strips and compare left, right, midpoint and trapezoid sums with the exact integral. Watch the error melt away. Free simulation.
Grade 11–12
Limits and the ε–δ Definition: A Visual Guide
See the epsilon-delta definition of a limit. Pick a function, shrink ε and watch the δ band follow it, with left and right limits, a hole, sin x / x and a jump where no δ works. Free simulation.
Grade 11–12
3D Vectors: Sum, Dot Product and Cross Product
Drag to rotate two 3D vectors. See the sum as a parallelogram, the dot product as a shadow and an angle, and the cross product as a perpendicular arrow whose length is the area. Free simulation.
Grade 11–12
Matrix Transformations: Rotation, Reflection, Shear and the Determinant
Change a 2×2 matrix and watch the grid, a unit square and an F-shape move. See where i-hat and j-hat land, the determinant as signed area, and the inverse. Free simulation.
Grade 11–12
Complex Numbers: Sum, Product, Powers and Roots on the Argand Plane
Drag two complex numbers on the Argand plane. See the sum as a parallelogram, the product as a rotation and stretch, conjugates, powers as a spiral and roots of unity. Free simulation.
Grade 9–12
Binary Number System: Place Value, Conversion and Addition
Flip bits and see decimal, binary, octal and hex change together. Watch conversion by repeated division by 2, regrouping into octal and hex, and binary addition with carries. Free, with worked examples.
Animations in other subjects
Physics
Refraction of light
Physics
Ohm's law
Physics
Projectile motion
Physics
Simple pendulum
Physics
Electric field
Physics
Wave interference
Physics
Free Fall
Physics
Lens ray diagrams
Physics
Newton's Laws of Motion
Physics
Spherical mirror ray diagrams
Physics
Electromagnetic Induction
Physics
Conservation of Momentum and Collisions
Physics
Work, Energy and Power
Physics
Inclined Plane
Physics
Uniform circular motion
Physics
Transverse and Longitudinal Waves
Physics
Levers and moments
Physics
Centre of mass
Physics
Spring-mass SHM
Physics
Vector addition: triangle and parallelogram laws
Physics
Relative velocity: trains and river crossing
Physics
Kepler's laws and elliptical orbits
Physics
Newton’s law of gravitation, g and satellites
Physics
Standing waves in strings and pipes
Physics
Resonance tube and the speed of sound
Physics
Beats: when two close notes pulse
Physics
Doppler effect: moving sources, listeners and sonic booms
Physics
Prism, dispersion of light and the rainbow
Physics
Kirchhoff’s laws: junction rule and loop rule
Physics
Wheatstone bridge and metre bridge
Physics
Single-slit diffraction
Physics
Defects of the human eye and their correction
Physics
Polarisation of light: Malus’s law and Brewster’s law
Physics
Charging and discharging a capacitor: the RC time constant
Physics
Magnetic field lines: bar magnet, current-carrying wire and solenoid
Physics
AC generator
Physics
Transformer
Physics
Heat transfer: conduction, convection and radiation
Physics
Photoelectric effect: Einstein’s equation and the stopping potential
Physics
Motor effect: force on a current-carrying wire and the DC motor
Physics
Gas molecules and kinetic theory: pressure, temperature and speed
Physics
The semiconductor diode: p–n junction, I–V curve and rectifier
Physics
Radioactive decay: half-life, the decay law and penetration
Physics
The Bohr atom: orbits, energy levels and the hydrogen spectrum
Chemistry
Structure of the atom
Chemistry
Acids, Bases and the pH Scale
Chemistry
Electron configuration
Chemistry
Gas laws: Boyle, Charles, Gay-Lussac, Avogadro and PV = nRT
Chemistry
How an Ionic Bond Forms
Chemistry
Electrolysis and Faraday’s Laws
Chemistry
Covalent Bond
Chemistry
Periodic Trends
Chemistry
Reaction rate and collision theory
Chemistry
States of matter: solid, liquid, gas and the heating curve
Chemistry
Atomic orbitals: the shapes of s, p and d, quantum numbers and nodes
Chemistry
Molecular shapes and VSEPR theory: bond pairs, lone pairs and angles
Chemistry
The mole concept: molar mass, Avogadro’s number and molar volume
Chemistry
Diffusion and effusion: Graham’s law of gases
Chemistry
Balancing chemical equations: method, examples and practice
Chemistry
Chemical equilibrium: the equilibrium constant Kc and Le Chatelier’s principle
Chemistry
Titration: finding an unknown concentration with a burette and an indicator
Chemistry
Galvanic cell: the Daniell cell, EMF and the Nernst equation
Chemistry
Redox reactions: oxidation numbers, electron transfer and half-equations
Chemistry
Hydrocarbons: alkanes, alkenes, alkynes and structural isomers in 3D
Chemistry
Functional groups: alcohols, aldehydes, ketones, acids, esters and amines
Chemistry
Polymerisation: addition and condensation polymers, polythene and nylon
Chemistry
Separation techniques: filtration, distillation, chromatography, crystallisation
Chemistry
Crystal lattice: SC, BCC and FCC unit cells, packing efficiency and density
Chemistry
Radioactivity: Alpha, Beta, Gamma Decay and Half-Life
Biology
Mitosis cell division
Biology
Diffusion and Osmosis
Biology
Photosynthesis
Biology
The human heart: structure and function
Biology
Mendelian Genetics
Biology
DNA Replication
Biology
Cellular Respiration
Biology
Enzyme Action
Biology
The Nerve Impulse and the Action Potential
Biology
The Nephron and Urine Formation
Biology
Meiosis Cell Division
Biology
Digestive System
Biology
Breathing Mechanism: Inhalation and Exhalation
Biology
Protein synthesis
Biology
Blood circulation: double circulation and cardiac output
Biology
Cell structure and organelles: plant cell vs animal cell
Biology
Reflex action and the reflex arc
Biology
The human eye: parts, image formation and accommodation
Biology
Muscle contraction and the sliding-filament model
Biology
Transport in plants: xylem, phloem and transpiration
Biology
Food chain and food web: energy flow and the 10 % rule
Biology
Population growth: exponential and logistic curves
Biology
Natural selection: peppered moths and the sooty tree
Biology
Immune response: primary and secondary antibody response
Biology






















