How to Create a Vector Function in Function Space 2 from Functions in Function Space 1?

Thank you for your help. When I reformatted the code to use your work I found out that v_1 and v_2 were Products, not Functions, so when I tried to use your notation it errored out saying that

AttributeError: 'Product' object has no attribute '_cpp_object'

That then led me to this thread when I tried to interpolate() the Product to become a Function. I then used project() instead of interpolate() and it appeared to work.

My modified code that appears to run is below, though I am not sure if this is the best way to get it working. Please let me know if there are any better ways to set it up than what I have done.

from fenics import *

mesh = IntervalMesh(50, 0.0, 10.0)
P1 = FiniteElement('CG', interval, 1)
P2 = FiniteElement('CG', interval, 2)
V1 = FunctionSpace(mesh, MixedElement([P1, P1]))
V2 = FunctionSpace(mesh, MixedElement([P2, P2]))
V1_scalar = FunctionSpace(mesh, P1)
V2_scalar = FunctionSpace(mesh, P1)
p1 = Expression('10.0 * pow(x[0] - 5.0, 2) * pow(x[0] - 6.0, 2)', degree=4)
p2 = Expression('0.0', degree=4)
p = Expression(('x[0] <= 5.0 ? p2 : x[0] >= 6.0 ? p2 : p1', '0.0'), p1=p1, p2=p2, degree=4)
w = interpolate(p, V1)

"""
u is solved as a vector function in V1 with two entries u_1 and u_2 for some problem
"""
u = Function(V1)
v1 = (3.0 * u[0] + 6.0 * u[1]) * w[0].dx(0)
v2 = (5.0 * u[0] - 2.0 * u[1]) * w[1].dx(0)
v1 = project(v1, V1_scalar)
v2 = project(v2, V1_scalar)
v = Function(V1)
assign(v.sub(0), v1)
assign(v.sub(1), v2)
v_new = interpolate(v, V2)