Let #I = int sin(lnx) dx#
We need to decide (guess) whether to use #sin(lnx)#as #u# or #dv#. It turns out that either will work.
Method 1
Let #u = sin(lnx)# and #dv = dx#.
Then #du = 1/x cos(lnx) dx# and #v = x#
#I = uv-intvdu#
# = xsin(lnx)-intcos(lnx) dx#
Repeat with #u = cos(lnx)# and #dv = dx#,
so #du = -1/xsin(lnx)# and #v = x#.
#I = xsin(lnx)-[ xcos(lnx)- int -sin(lnx) dx ]#
so
#I = xsin(lnx)- xcos(lnx)- underbrace(int sin(lnx) dx)_I #
#2I = xsin(lnx)- xcos(lnx)#
#I = 1/2( xsin(lnx)- xcos(lnx) )#
Method 2
Let #I = int sin(lnx) dx#
In order to use #sin(lnx) dx# in #dv#, we'll need to be able to integrate #dv#.
We could use substitution if we had the derivative of #lnx# as a factor, so we'll introduce it.
#I = int x sin(lnx) 1/x dx#
Let #u = x# and #dv = sin(lnx) 1/x dx#.
Then #du =dx# and #v = -cos(lnx)#
#I = uv-intvdu#
# = -xcos(lnx)+int cos(lnx) dx#
We'll use parts again. (And we'll hope that it works. If it doesn't, we'll try something else.)
# = -xcos(lnx)+int x cos(lnx) 1/x dx#
Let #u = x# and #dv = cos(lnx) 1/x dx#.
Then #du =dx# and #v = sin(lnx)#
#I = -xcos(lnx)+[xsin(lnx)-underbrace(intsin(lnx) dx)_I]#
#2I = -xcos(lnx)+xsin(lnx)#
#I = 1/2( xsin(lnx)- xcos(lnx) )#