1
$\begingroup$

I defined a function of two variables, let's say

u[x_, y_] := 4 x^4 + 6 x y - 24 x^2 y^2 + 4 y^4

I want to partial integrate (with respect to y) the partial derivative of u with respect to x obtaining a function v[x_,y_] in which is present an additive function of x, let's say c[x]. I tried

v[x_, y_] = Integrate[\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]\ \(u[x, y]\)\), y, 
  GeneratedParameters -> C]

but so I obtain a constant function c_1. Otherwise I have to add to the integral c[x]. Is it possible to obtain an additive function of x with GeneratedParameters?

$\endgroup$
1
  • $\begingroup$ Why not adding c[x] outside of integral? i.e. v[x_, y_] = Integrate[\!\( \*SubscriptBox[\(\[PartialD]\), \(x\)]\ \(u[x, y]\)\), y] + c[x] $\endgroup$ Jul 24 at 19:01
1
$\begingroup$

c[x] is not possible because MMA may need several constants and these are written: c[1], c[2].. However, you may indicate that the constant depends on x by using GeneratedParameters -> C[x] what will result in: c[x][1] what is displayed as e.g. with your example:

u[x_, y_] := 4 x^4 + 6 x y - 24 x^2 y^2 + 4 y^4
 Integrate[\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]\ \(u[x, y]\)\), y, 
 GeneratedParameters -> C[x]]

enter image description here

$\endgroup$
3
  • $\begingroup$ Thanks for your kind reply. Now how can I turn cx[1] into c[x]? I must then derivate c with respect to x and I don't want [1]. $\endgroup$
    – CharlesG
    Jul 24 at 20:50
  • $\begingroup$ E.g.: Integrate[\!\( \*SubscriptBox[\(\[PartialD]\), \(x\)]\ \(u[x, y]\)\), y, GeneratedParameters -> C[x]]Integrate[\!\( \*SubscriptBox[\(\[PartialD]\), \(x\)]\ \(u[x, y]\)\), y, GeneratedParameters -> C[x]] /. C[x][1] -> f[x] $\endgroup$ Jul 24 at 20:55
  • $\begingroup$ Thank you very much $\endgroup$
    – CharlesG
    Jul 25 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.