Installing both windows 10 and ubuntu

can i install both windows 10 and ubuntu in my 4GB Ram PC under the same partition? i want to give it a try but i fear that windows 10 might not be able to run smoothly after the process..

please help