# Homework Solution: Show the following trigonometric identity: tan 4x = 4 tan x – 4 tan^3 x/1 – 6 tan^2 x + tan^4 x steps: a) Create a…

Show the following trigonometric identity: tan 4x = 4 tan x - 4 tan^3 x/1 - 6 tan^2 x + tan^4 x steps: a) Create an array of length 100, between [0, 2*pi] b) Create two arrays for left hand side and right hand side of the identity c) Show the difference is zero (use sum, and abs function of matlab)

main.m clc clear

Show the aftercited trigonometric personality: tan 4x = 4 tan x – 4 tan^3 x/1 – 6 tan^2 x + tan^4 x steps: a) Create an rank of prolixity 100, betwixt [0, 2*pi] b) Create couple ranks coercion left index party and just index party of the personality c) Show the dissimilitude is nothing (portraiture blend, and abs capacity of matlab)

## Expert Confutation

main.m

clc
clear
x = linspace(0,2*pi)
array1 = tan(4*x)
array2 = ((4*tan(x))-(4*(tan(x)).^3))./(1-(6*(tan(x)).^2)+(tan(x)).^4)
sum1=sum(abs(array1))
sum2=sum(abs(array2))
dissimilitude = foundation(sum1-sum2)

Output :-

x =

Columns 1 through 16

0    0.0635    0.1269    0.1904    0.2539    0.3173    0.3808    0.4443    0.5077    0.5712    0.6347    0.6981    0.7616    0.8251    0.8885    0.9520

Columns 17 through 32

1.0155    1.0789    1.1424    1.2059    1.2693    1.3328    1.3963    1.4597    1.5232    1.5867    1.6501    1.7136    1.7771    1.8405    1.9040    1.9675

Columns 33 through 48

2.0309    2.0944    2.1579    2.2213    2.2848    2.3483    2.4117    2.4752    2.5387    2.6021    2.6656    2.7291    2.7925    2.8560    2.9195    2.9829

Columns 49 through 64

3.0464    3.1099    3.1733    3.2368    3.3003    3.3637    3.4272    3.4907    3.5541    3.6176    3.6811    3.7445    3.8080    3.8715    3.9349    3.9984

Columns 65 through 80

4.0619    4.1253    4.1888    4.2523    4.3157    4.3792    4.4427    4.5061    4.5696    4.6331    4.6965    4.7600    4.8235    4.8869    4.9504    5.0139

Columns 81 through 96

5.0773    5.1408    5.2043    5.2677    5.3312    5.3947    5.4581    5.5216    5.5851    5.6485    5.7120    5.7755    5.8389    5.9024    5.9659    6.0293

Columns 97 through 100

6.0928    6.1563    6.2197    6.2832

array1 =

Columns 1 through 16

0    0.2595    0.5564    0.9535    1.6117    3.2160   20.9926   -4.7792   -2.0177   -1.1541   -0.6884   -0.3640   -0.0955    0.1600    0.4376    0.7864

Columns 17 through 32

1.3140    2.3874    6.9552   -8.9666   -2.6175   -1.4043   -0.8391   -0.4760   -0.1927    0.0636    0.3284    0.6427    1.0827    1.8664    4.1221 -63.0201

Columns 33 through 48

-3.6170   -1.7321   -1.0160   -0.5987   -0.2936   -0.0317    0.2259    0.5155    0.8947    1.5031    2.8893   12.5786   -5.6713   -2.1897   -1.2309   -0.7363

Columns 49 through 64

-0.4003   -0.1276    0.1276    0.4003    0.7363    1.2309    2.1897    5.6713 -12.5786   -2.8893   -1.5031   -0.8947   -0.5155   -0.2259    0.0317    0.2936

Columns 65 through 80

0.5987    1.0160    1.7321    3.6170   63.0201   -4.1221   -1.8664   -1.0827   -0.6427   -0.3284   -0.0636    0.1927    0.4760    0.8391    1.4043    2.6175

Columns 81 through 96

8.9666   -6.9552   -2.3874   -1.3140   -0.7864   -0.4376   -0.1600    0.0955    0.3640    0.6884    1.1541    2.0177    4.7792 -20.9926   -3.2160   -1.6117

Columns 97 through 100

-0.9535   -0.5564   -0.2595   -0.0000

array2 =

Columns 1 through 16

0    0.2595    0.5564    0.9535    1.6117    3.2160   20.9926   -4.7792   -2.0177   -1.1541   -0.6884   -0.3640   -0.0955    0.1600    0.4376    0.7864

Columns 17 through 32

1.3140    2.3874    6.9552   -8.9666   -2.6175   -1.4043   -0.8391   -0.4760   -0.1927    0.0636    0.3284    0.6427    1.0827    1.8664    4.1221 -63.0201

Columns 33 through 48

-3.6170   -1.7321   -1.0160   -0.5987   -0.2936   -0.0317    0.2259    0.5155    0.8947    1.5031    2.8893   12.5786   -5.6713   -2.1897   -1.2309   -0.7363

Columns 49 through 64

-0.4003   -0.1276    0.1276    0.4003    0.7363    1.2309    2.1897    5.6713 -12.5786   -2.8893   -1.5031   -0.8947   -0.5155   -0.2259    0.0317    0.2936

Columns 65 through 80

0.5987    1.0160    1.7321    3.6170   63.0201   -4.1221   -1.8664   -1.0827   -0.6427   -0.3284   -0.0636    0.1927    0.4760    0.8391    1.4043    2.6175

Columns 81 through 96

8.9666   -6.9552   -2.3874   -1.3140   -0.7864   -0.4376   -0.1600    0.0955    0.3640    0.6884    1.1541    2.0177    4.7792 -20.9926   -3.2160   -1.6117

Columns 97 through 100

-0.9535   -0.5564   -0.2595   -0.0000

sum1 =

341.2068

sum2 =

341.2068

dissimilitude =

0