Does this method make sense written down this way?

  • Thread starter studentxlol
  • Start date
  • Tags
    Method
In summary, the conversation is about solving the differential equation \frac{d^2y}{dx^2}=3x^2-10x+3. The attempt at a solution involves integrating the given equation and discussing whether it makes sense mathematically. However, even if the parentheses are fixed, the solution is incorrect and has an additional constant of integration.
  • #1
studentxlol
40
0

Homework Statement



Solve the differential equation: [tex]\frac{d^2y}{dx^2}=3x^2-10x+3[/tex]

The Attempt at a Solution



[tex]\int\int \frac{d}{dx}\frac({dy}{dx})3x^2-10x+3=\frac{1}{4}x^4-\frac{5}{3}x^3+\frac{3}{2}x^2+c[/tex]

Does that make sense mathematically?
 
Physics news on Phys.org
  • #2
studentxlol said:

Homework Statement



Solve the differential equation: [tex]\frac{d^2y}{dx^2}=3x^2-10x+3[/tex]

The Attempt at a Solution



[tex]\int\int \frac{d}{dx}(\frac{dy}{dx})3x^2-10x+3=\frac{1}{4}x^4-\frac{5}{3}x^3+\frac{3}{2}x^2+c[/tex]

Does that make sense mathematically?
...
No. Not even if you fix the parentheses.

[itex]\displaystyle\int\frac{d}{dx}\left(\frac{dy}{dx} \right)dx=\int\left(3x^2-10x+3\right)dx[/itex]

[itex]\displaystyle\frac{dy}{dx}=x^3-5x^2+3x+C_1[/itex]

So that: [itex]\displaystyle y=\int\left\{\int\frac{d}{dx}\left( \frac{dy}{dx} \right)dx\right\}dx=\int\left(x^3-5x^2+3x+C_1\right)dx[/itex]
which has an additional constant of integration.​
 

FAQ: Does this method make sense written down this way?

What is the purpose of writing a method down in a specific way?

The purpose of writing a method in a specific way is to ensure that it is clear, concise, and easy to understand for other programmers who may need to use or modify the method in the future. It also helps to maintain consistency and organization within the code.

How can I determine if a method is written in a logical and efficient manner?

To determine if a method is logical and efficient, it is important to consider the following factors:

  • Does the method solve the problem it is intended to solve?
  • Are there any redundant or unnecessary steps within the method?
  • Does the method follow best practices and coding standards?
  • Is the method easy to read and understand?
  • Does the method use appropriate data types and variable names?
If the answer to these questions is yes, then the method is most likely written in a logical and efficient manner.

Are there any specific guidelines for writing a method?

Yes, there are some general guidelines that can help ensure a method is well-written. These include using descriptive and concise names for methods and variables, breaking down complex tasks into smaller, more manageable steps, and including comments to explain the purpose and functionality of the method.

How do I know if my method is easy for others to understand?

A good way to determine if your method is easy for others to understand is to have someone else review your code and provide feedback. This could be a fellow programmer or a code review tool. Additionally, you can also try to simplify the method or break it down into smaller, more digestible chunks.

Can a method be written in different ways and still make sense?

Yes, there are often multiple ways to write a method that will still achieve the same result. However, it is important to choose a method that is clear, efficient, and follows best practices to ensure easy maintenance and readability for others in the future.

Back
Top