Solving equation with integration using MATLAB

In summary, the conversation is about solving an equation in MATLAB where all parameters except for p are known. The integrand has an absolute value sign, making it difficult to solve. The suggestion is to consider different values of m and split the integration into cases for odd and even values. For odd m, the expression is the same as (expression)^m, while for even m, there are two choices depending on the sign of the expression.
  • #1
kelvin490
Gold Member
228
3
I would like to solve an equation below using MATLAB:

f3kMQ.jpg


All the parameters except p are known, so I only need to solve for p. However since I need to consider the sign of the integrand and there is an absolute value sign in it I don't know how to solve it. Could anyone please help? Thank you.
 
Physics news on Phys.org
  • #2
Consider different values of m. Is m an integer? If so, then you will have two cases:
You have sign(expression) * (abs(expression))^m
Odd m: sign(expression) * (abs(expression))^m is the same as (expression)^m

Even m: sign(expression) * (abs(expression))^m will have two choices:
if expression is positive, then the same as (expression)^m
if expression is negative, then the same as -(expression)^m

So see if you can split into cases like this and integrate in portions.
 

What is MATLAB?

MATLAB is a high-level programming language and interactive environment commonly used in scientific and engineering applications. It allows users to perform complex mathematical calculations, visualize data, and create models and simulations.

How do I solve an equation using integration in MATLAB?

To solve an equation using integration in MATLAB, you can use the int function. This function takes the equation as its first input and the variable of integration as its second input. It will return the result of the integration as an output.

What is the syntax for using the int function in MATLAB?

The syntax for using the int function in MATLAB is int(equation, variable_of_integration). It is important to make sure that the equation is written in terms of the specified variable of integration.

Can I solve equations with multiple variables using integration in MATLAB?

Yes, you can solve equations with multiple variables using integration in MATLAB. You will need to specify the equation in terms of all the variables and provide the correct syntax for the int function.

Are there any limitations to solving equations with integration in MATLAB?

There are some limitations to solving equations with integration in MATLAB. The int function may not be able to solve certain types of equations, such as those with discontinuous or non-numeric solutions. It is always important to check the output and make sure it is a valid solution.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top