Correct

同样 vs 一样

/ tóngyàng vs yīyàng /
Strokes

Definition

同样 as an Adjective or a Conjunction, and 一样 just as an Adjective, which both means [same; similarly; identical].

Example

同样 and 一样 are Adjective that can only function as an attributive, adverbial, but not as a predicate and cannot be modified by adverbs of degree.
As an attributive, it usually takes 的, whereas as an adverbial it does not take 地.
1
men
他们
liǎng
rén
yǒu
tóngyàng
同样
de
xìng
性格
  
,
tóngyàng
同样
  
(
yàng
一样
  
)
de
shēnghuó
生活
guàn
习惯
  

They both have the same nature and life habit.

2
Yùndòngyuán
运动员
men
dōu
chuānzhāo
穿着
tóngyàng
同样
  
(
yàng
一样
  
)
de
yùndòng
运动服
  

All the players dress alike.

3
Tóngyàng
同样
  
(
yàng
一样
  
)
de
jiàoxué
教学
fāng
方法
shìyòng
适用
其他
yǒu
lèi
类似
wèn
问题
de
xuésheng
学生
  

The same method can also be applied for other students with similar problems.

4
Xué
学习
duànliàn
锻炼
shēn
身体
  
(
yàng
一样
  
)
tóngyàng
同样
zhòngyào
重要
  

Learning is as important as physical exercise.

5
Zhè
liǎng
xuésheng
学生
de
yīng
英语
tóngyàng
同样
  
(
yàng
一样
  
)
hǎo
  

The two students both excel at English.

6
Shēngchǎn
生产
速度
chǎnpǐn
产品
zhìliàng
质量
tóngyàng
同样
  
(
yàng
一样
  
)
dōu
yào
gāo
提高
  

Production speed and product quality should both be improved.

同样 is also a Conjunction, used between clauses or sentences to indicate what follows is the same as what goes before; while 一样 has no similar usages.
There is a pause to follow and 的 can be added.
7
gōngzuò
工作
fēicháng
非常
rènzhēn
认真
  
负责
  
,
tóngyàng
同样
  
,
zài
shēnghuó
生活
shàng
shì
gǒu
一丝不苟
  

He is conscientious and responsible for his work as well as for his life.

8
nián
去年
shì
10
10
yuè
lái
běijīng
北京
de
  
,
tóngyàng
同样
  
,
jīnnián
今年
háishi
还是
shí
yuè
lái
  

He came to Beijing in October last year, and so will he this year.

9
shēn
身体
hǎo
le
  
,
tóngyàng
同样
de
  
,
jīngshén
精神
miànmào
面貌
shēng
发生
le
biànhuà
变化
  

He is healthy now,and similarly he takes on a new look.

10
Gōngzuò
工作
shàng
yào
zhù
注意
xiào
效率
  
,
tóngyàng
同样
  
,
xué
学习
shàng
yào
zhù
注意
xué
学习
xiàoguǒ
效果
  

Attention should be paid to work efficiency as well as learning efficiency.

一样 is an Adjective and can function as attributive, predicate, adverbial, and can be modified by adverbs, etc. As an attributive, it usually takes 的.
1) In examples ⑪ ⑭ and ⑮ 一样 can be replaced by 同样.

2) In examples ⑫ and ⑬, however, 一样 functions as the predicates and cannot be replaced by 同样.
11
yàng
一样
  
(
tóngyàng
同样
  
)
de
xuéxiào
学校
  
,
yàng
一样
de
lǎoshī
老师
  
,
wèishénme
为什么
de
xué
学习
chéng
成绩
不如
xiǎomíng
小明
ne
  
?

You and Xiaoming are in the same school and have the same teachers. Why do you study worse than him?

12
lái
lái
dōu
yàng
一样
  

It is the same for either you or him to come.

13
men
他们
liǎng
rén
de
xìng
性格
wánquán
完全
yàng
一样
  

They differ completely in characters.

14
Zhè
tái
diànshì
电视
tái
diànshì
电视
de
xiàng
图像
yàng
一样
  
(
tóngyàng
同样
  
)
qīng
清晰
  

The pictures this TV and that TV are all clear.

15
Jīntiān
今天
zuótiān
昨天
yàng
一样
  
(
tóngyàng
同样
  
)
lěng
  

It is as cold as it was yesterday.

一样 as an Adjective also means "as before" and mostly functions as the adverbial.
If followed by such auxiliary verbs as 能, 可以, etc., 一样 can be replaced by 同样, as in examples ⑰ and ⑱, but not in example ⑯.
16
Yīnyuè
音乐
de
shēngyīn
声音
me
那么
xiǎng
  
,
yàng
一样
kàn
shū
  
xiě
写字
  
,
háo
丝毫
shòu
yǐngxiǎng
影响
  

The loud sound of music has no influence on him and he still reads and writes.

17
Zhè
这笔
suīshuō
虽说
jiù
le
diǎnr  
点儿
  
,
dàn
yàng
一样
  
(
tóngyàng
同样
  
)
可以
xiě
chū
hǎo
  

Though the pen is a bit old, it can write well.

18
gōng
理工科
de
xuésheng
学生
yàng
一样
  
(
tóngyàng
同样
  
)
yào
需要
liǎojiě
了解
diǎn
wénshǐ
文史
zhīshi
知识
  

Science students also need learn something about humanities.